Bug 184899 - mail/wmmaiload: Fix build on -current
Summary: mail/wmmaiload: Fix build on -current
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 18:10 UTC by tkato432
Modified: 2013-12-24 16:00 UTC (History)
0 users

See Also:


Attachments
file.diff (2.60 KB, patch)
2013-12-16 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-12-16 18:10:28 UTC
- Fix build on -current
Comment 1 Pawel Pekala freebsd_committer freebsd_triage 2013-12-24 13:31:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pawel

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-24 13:41:49 UTC
Author: pawel
Date: Tue Dec 24 13:41:41 2013
New Revision: 337354
URL: http://svnweb.freebsd.org/changeset/ports/337354

Log:
  - Fix build on -current
  - Convert to new options framework
  - Support staging
  
  PR:		ports/184899
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Modified:
  head/mail/wmmaiload/Makefile   (contents, props changed)

Modified: head/mail/wmmaiload/Makefile
==============================================================================
--- head/mail/wmmaiload/Makefile	Tue Dec 24 13:32:47 2013	(r337353)
+++ head/mail/wmmaiload/Makefile	Tue Dec 24 13:41:41 2013	(r337354)
@@ -10,37 +10,45 @@ MASTER_SITES=	http://tnemeth.free.fr/pro
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Incoming mail monitor dockapp with a similar look to wmcpuload
 
+OPTIONS_DEFINE=	GTK2
+
 USES=		gmake pkgconfig
 USE_XORG=	xpm
 USE_OPENSSL=	yes
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX}
-MAKE_ARGS=	CC="${CC}" \
-		CFLAGS="${CFLAGS} -D_GNU_SOURCE ${PTHREAD_CFLAGS}" \
-		CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib" \
-		LIB_SSL="-lssl -lcrypto" \
-		LIB_THREADS="${PTHREAD_LIBS}" \
-		DEBUG_CFLAGS="-I${OPENSSLINC}" \
+MAKE_ENV=	DEBUG_CFLAGS="-I${OPENSSLINC}" \
 		DEBUG_LDFLAGS="-L${OPENSSLLIB}"
 
-MAN1=		${PORTNAME}.1 ${PORTNAME}-config.1
-PLIST_FILES=	bin/wmmaiload bin/wmmaiload-config
+CFLAGS+=	-D_GNU_SOURCE
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+PLIST_FILES=	bin/wmmaiload bin/wmmaiload-config \
+		man/man1/wmmaiload.1.gz man/man1/wmmaiload-config.1.gz
+
+.include <bsd.port.options.mk>
 
-.if defined(WITH_GTK2)
+.if ${PORT_OPTIONS:MGTK2}
 USE_GNOME+=	gtk20
-MAKE_ARGS+=	GTK_CFLAGS="pkg-config --cflags gtk+-2.0" \
+MAKE_ENV+=	GTK_CFLAGS="pkg-config --cflags gtk+-2.0" \
 		GTK_LIBS="pkg-config --libs gtk+-2.0"
 .else
 USE_GNOME+=	gtk12
-MAKE_ARGS+=	GTK_CFLAGS="pkg-config --cflags gtk+" \
+MAKE_ENV+=	GTK_CFLAGS="pkg-config --cflags gtk+" \
 		GTK_LIBS="pkg-config --libs gtk+"
 .endif
 
-NO_STAGE=	yes
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN=		Does not compile on ia64, powerpc, or sparc64
+.endif
+
 post-patch:
+	@${FIND} ${WRKSRC} -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
+		's| =| ?=|'
 .for i in wmmaiload/Init.make
-	@${REINPLACE_CMD} -e 's|-L/usr/X11R6/lib||g' ${WRKSRC}/${i}
+	@${REINPLACE_CMD} -e 's|-L/usr/X11R6/lib||g ; \
+		 s|-lpthread|-pthread|g' ${WRKSRC}/${i}
 .endfor
 .for i in wmmaiload/checkthread.c
 	@${REINPLACE_CMD} -e 's|isnumber(|isnum(|g' ${WRKSRC}/${i}
@@ -63,14 +71,10 @@ post-patch:
 
 do-install:
 .for i in wmmaiload wmmaiload-config
-	${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/doc/${i}.1 ${MANPREFIX}/man/man1
+	(cd ${WRKSRC}/${i} && ${INSTALL_PROGRAM} ${i} \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC}/doc && ${INSTALL_MAN} ${i}.1 \
+		${STAGEDIR}${MANPREFIX}/man/man1)
 .endfor
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=		Does not compile on ia64, powerpc, or sparc64
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2013-12-24 13:41:50 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-12-24 15:57:02 UTC
Author: mat
Date: Tue Dec 24 15:56:50 2013
New Revision: 337364
URL: http://svnweb.freebsd.org/changeset/ports/337364

Log:
  MFH: r337354
  
  - Fix build on -current
  - Convert to new options framework
  - Support staging
  
  PR:		ports/184899
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
  Approved by:	portmgr (implicit)

Modified:
  branches/2014Q1/mail/wmmaiload/Makefile   (contents, props changed)
Directory Properties:
  branches/2014Q1/   (props changed)

Modified: branches/2014Q1/mail/wmmaiload/Makefile
==============================================================================
--- branches/2014Q1/mail/wmmaiload/Makefile	Tue Dec 24 15:55:35 2013	(r337363)
+++ branches/2014Q1/mail/wmmaiload/Makefile	Tue Dec 24 15:56:50 2013	(r337364)
@@ -10,37 +10,45 @@ MASTER_SITES=	http://tnemeth.free.fr/pro
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Incoming mail monitor dockapp with a similar look to wmcpuload
 
+OPTIONS_DEFINE=	GTK2
+
 USES=		gmake pkgconfig
 USE_XORG=	xpm
 USE_OPENSSL=	yes
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX}
-MAKE_ARGS=	CC="${CC}" \
-		CFLAGS="${CFLAGS} -D_GNU_SOURCE ${PTHREAD_CFLAGS}" \
-		CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib" \
-		LIB_SSL="-lssl -lcrypto" \
-		LIB_THREADS="${PTHREAD_LIBS}" \
-		DEBUG_CFLAGS="-I${OPENSSLINC}" \
+MAKE_ENV=	DEBUG_CFLAGS="-I${OPENSSLINC}" \
 		DEBUG_LDFLAGS="-L${OPENSSLLIB}"
 
-MAN1=		${PORTNAME}.1 ${PORTNAME}-config.1
-PLIST_FILES=	bin/wmmaiload bin/wmmaiload-config
+CFLAGS+=	-D_GNU_SOURCE
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+
+PLIST_FILES=	bin/wmmaiload bin/wmmaiload-config \
+		man/man1/wmmaiload.1.gz man/man1/wmmaiload-config.1.gz
+
+.include <bsd.port.options.mk>
 
-.if defined(WITH_GTK2)
+.if ${PORT_OPTIONS:MGTK2}
 USE_GNOME+=	gtk20
-MAKE_ARGS+=	GTK_CFLAGS="pkg-config --cflags gtk+-2.0" \
+MAKE_ENV+=	GTK_CFLAGS="pkg-config --cflags gtk+-2.0" \
 		GTK_LIBS="pkg-config --libs gtk+-2.0"
 .else
 USE_GNOME+=	gtk12
-MAKE_ARGS+=	GTK_CFLAGS="pkg-config --cflags gtk+" \
+MAKE_ENV+=	GTK_CFLAGS="pkg-config --cflags gtk+" \
 		GTK_LIBS="pkg-config --libs gtk+"
 .endif
 
-NO_STAGE=	yes
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN=		Does not compile on ia64, powerpc, or sparc64
+.endif
+
 post-patch:
+	@${FIND} ${WRKSRC} -name "Makefile" | ${XARGS} ${REINPLACE_CMD} -e \
+		's| =| ?=|'
 .for i in wmmaiload/Init.make
-	@${REINPLACE_CMD} -e 's|-L/usr/X11R6/lib||g' ${WRKSRC}/${i}
+	@${REINPLACE_CMD} -e 's|-L/usr/X11R6/lib||g ; \
+		 s|-lpthread|-pthread|g' ${WRKSRC}/${i}
 .endfor
 .for i in wmmaiload/checkthread.c
 	@${REINPLACE_CMD} -e 's|isnumber(|isnum(|g' ${WRKSRC}/${i}
@@ -63,14 +71,10 @@ post-patch:
 
 do-install:
 .for i in wmmaiload wmmaiload-config
-	${INSTALL_PROGRAM} ${WRKSRC}/${i}/${i} ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/doc/${i}.1 ${MANPREFIX}/man/man1
+	(cd ${WRKSRC}/${i} && ${INSTALL_PROGRAM} ${i} \
+		${STAGEDIR}${PREFIX}/bin)
+	(cd ${WRKSRC}/doc && ${INSTALL_MAN} ${i}.1 \
+		${STAGEDIR}${MANPREFIX}/man/man1)
 .endfor
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=		Does not compile on ia64, powerpc, or sparc64
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"