Thread: Creating port
View Single Post
  #6   (View Single Post)  
Old 7th September 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

The problem here is that libgambatte and gambatte_sdl are separate projects, if you read scons(1) you'll see that the -C operand doesn't work the way that you intended.

The following seems to work.. and it's a little cleaner, but please considering posting to the list for further critiquing from qualified eyes.

Code:
--- Makefile.orig	Mon Sep  7 23:50:01 2009
+++ Makefile	Mon Sep  7 23:48:26 2009
@@ -20,13 +20,14 @@
 LIB_DEPENDS += SDL::devel/sdl
 WANTLIB += c m pthread stdc++ z
 
+WRKSRC=${WRKDIST}/gambatte_sdl
+
 do-build:
-	@${SETENV} ${MAKE_ENV} ${MODSCONS_BIN} -C ${WRKSRC}/gambatte_sdl \
-	    -C ${WRKSRC}/libgambatte
+	${MODSCONS_BIN} -C ${WRKDIST}/libgambatte
+	${MODSCONS_BIN} -C ${WRKSRC}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKBUILD}/gambatte_sdl/gambatte_sdl ${PREFIX}/bin/
-	${INSTALL_MAN} ${WRKBUILD}/gambatte_sdl/man/gambatte_sdl.6 \
-	    ${PREFIX}/man/man6/
+	${INSTALL_PROGRAM} ${WRKSRC}/gambatte_sdl ${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/man/gambatte_sdl.6 ${PREFIX}/man/man6
 
 .include <bsd.port.mk>
Hope that helps.
Reply With Quote