# wrksrc problem



## roelof (Sep 14, 2013)

Hello, 

For learning how porting works in FreeBSD I try to update Muffin. I now have this:


```
# Created by: Gustau Perez i Querol <gustau.perez@gmail.com>
# $FreeBSD$

PORTNAME=	muffin
PORTVERSION=	1.8.2
CATEGORIES=	x11-wm gnome
DIST_SUBDIR=	gnome3

MAINTAINER=	gustau.perez@gmail.com
COMMENT=	Compositing window manager forked from Mutter for use with Cinnamon

BUILD_DEPENDS=	
LIB_DEPENDS=	
RUN_DEPENDS=	

USE_GITHUB=	yes
GH_ACCOUNT=	linuxmint
GH_TAGNAME=	1.8.2
GH_COMMIT=	c13a698b

USE_XORG=	x11 xext xrandr xcomposite xcursor xinerama ice sm
USE_PYTHON=	2.5+
USE_GETTEXT=	yes
USE_GMAKE=	yes
USE_AUTOTOOLS=	libtool autoconf automake
USES=		pathfix
USE_GNOME=	gnomehier gnomeprefix intlhack gtk30 gconf2
USE_LDCONFIG=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ENV=	LIBS="-lexecinfo"
CONFIGURE_ARGS=	--enable-compile-warnings=maximum
GLIB_SCHEMAS=	org.cinnamon.muffin.gschema.xml

MAN1=		muffin-message.1 muffin-theme-viewer.1 muffin-window-demo.1 \
		muffin.1

pre-configure:
		@cd ${WRKSRC} && ${SH} autogen.sh

.include <bsd.port.mk>
```

But if I do `make` I still see that the work directory is named linuxmint-muffin-60cab8b instead of linuxmint-muffin-c13a698b.

Can someone explain to me how this can happen and how to solve this?

Roelof


----------



## wblock@ (Sep 14, 2013)

Does

```
GH_COMMIT=	c13a698b
GH_TAGNAME=	${GH_COMMIT}
```
make it work?  Oh, and try to avoid repeating constants:

```
GH_PROJECT=	${PORTNAME}
```


----------



## roelof (Sep 14, 2013)

I'm a little bit confused now. Should I try the first or second one? Can it be the problem that the port has an svn directory?

Roelof


----------



## wblock@ (Sep 14, 2013)

There were two different things, but ignore the second, I had confused it with a different file.

Set GH_TAGNAME to the same value as GH_COMMIT.


----------



## roelof (Sep 15, 2013)

The same error stays so the problem is not solved. Maybe a w*ei*rd question but schould the Makefile have to have some line to clone or update the git repo*?*

Roelof

Edit 1: Can it be the problem that the url is*:* https://github.com/linuxmint/muffin. So Muffin is a sub-project of Linux Mint*?*


----------



## wblock@ (Sep 15, 2013)

It just worked for me, using your Makefile but with this change:

```
USE_GITHUB=     yes
GH_ACCOUNT=     linuxmint
GH_COMMIT=      c13a698b
GH_TAGNAME=     ${GH_COMMIT}
```

The work directory contains linuxmint-muffin-c13a698.


----------



## roelof (Sep 15, 2013)

W*ei*rd, 

On my pc-bsd PC-BSD box where I have the FreeBSD ports it do*es* not work. I get a linuxmint-muffin-60cab8b directory.

Roelof


----------



## wblock@ (Sep 15, 2013)

Do a `make distclean` and let it fetch the distfile again.


----------



## roelof (Sep 15, 2013)

Thanks, the package starts to compile now.

Roelof


----------

