Bug 170813 - [MAINTAINER PATCH] x11-fm/doublecmd: optionsng, lib_depends, debug
Summary: [MAINTAINER PATCH] x11-fm/doublecmd: optionsng, lib_depends, debug
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: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 08:10 UTC by Beñat Gonzalez Etxepare
Modified: 2012-08-23 18:20 UTC (History)
0 users

See Also:


Attachments
file.txt (2.03 KB, text/plain)
2012-08-21 08:10 UTC, Beñat Gonzalez Etxepare
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beñat Gonzalez Etxepare 2012-08-21 08:10:10 UTC
Changes:
- Switch to OptionsNG
- Remove ABI version from LIB_DEPENDS
- Add option to compile with debug symbols


Patch tested in RedPorts (rev. 6214):
http://redports.org/buildarchive/20120820152752-4852/
http://redports.org/buildarchive/20120820173534-36210/

Fix: Patch attached with submission follows:
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2012-08-23 10:46:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->madpilot

I'll take it.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2012-08-23 18:14:40 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-08-23 18:14:45 UTC
Author: madpilot
Date: Thu Aug 23 17:14:29 2012
New Revision: 303032
URL: http://svn.freebsd.org/changeset/ports/303032

Log:
  - Convert to OptionsNG
  - Remove ABI version from LIB_DEPENDS
  - Add option to compile with debug symbols
  
  PR:		ports/170813
  Submitted by:	bbtruk@users.sourceforge.net (maintainer)
  Approved by:	crees, tabthorpe (mentors, implicit)

Modified:
  head/x11-fm/doublecmd/Makefile   (contents, props changed)

Modified: head/x11-fm/doublecmd/Makefile
==============================================================================
--- head/x11-fm/doublecmd/Makefile	Thu Aug 23 16:41:51 2012	(r303031)
+++ head/x11-fm/doublecmd/Makefile	Thu Aug 23 17:14:29 2012	(r303032)
@@ -33,28 +33,37 @@ LAZBUILD_CMD=	${LOCALBASE}/bin/lazbuild
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 DOCSRC=		${WRKDIR}/${PORTNAME}-help-0.5.1
 
-OPTIONS=	GTK2	"Use gtk20 interface" on \
-		QT4	"Use qt4 interface" off
+OPTIONS_DEFINE=		DEBUG
+OPTIONS_SINGLE=		LCL
+OPTIONS_SINGLE_LCL=	GTK2 QT4
+
+GTK2_DESC=		Use gtk20 interface
+QT4_DESC=		Use qt4 interface
+DEBUG_DESC=		Build with complete symbolic debug information
 
-.include <bsd.port.pre.mk>
+OPTIONS_DEFAULT=	GTK2
 
-.if (defined(WITH_GTK2) && defined(WITH_QT4)) || (!defined(WITH_GTK2) && !defined(WITH_QT4))
-IGNORE=		please select one option: QT4 or GTK2
-.endif
+.include <bsd.port.pre.mk>
 
-.if defined(WITH_GTK2)
+.if ${PORT_OPTIONS:MGTK2}
 USE_FPC+=	gtk2
 USE_GNOME=	gtk20 gdkpixbuf
 LCL_PLATFORM=	gtk2
 BUILD_DEPENDS+=	${LOCALBASE}/share/lazarus/lcl/units/${BUILDNAME}/${LCL_PLATFORM}/interfaces.ppu:${PORTSDIR}/editors/lazarus-lcl-gtk2
 .endif
 
-.if defined(WITH_QT4)
-LIB_DEPENDS+=	Qt4Pas.5:${PORTSDIR}/x11-toolkits/qt4pas
+.if ${PORT_OPTIONS:MQT4}
+LIB_DEPENDS+=	Qt4Pas:${PORTSDIR}/x11-toolkits/qt4pas
 LCL_PLATFORM=	qt
 BUILD_DEPENDS+=	${LOCALBASE}/share/lazarus/lcl/units/${BUILDNAME}/${LCL_PLATFORM}/interfaces.ppu:${PORTSDIR}/editors/lazarus-lcl-qt
 .endif
 
+.if ${PORT_OPTIONS:MDEBUG}
+BUILD_MODE=	Debug
+.else
+BUILD_MODE=	NoDebug Full Optimizations
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|%%DOCSDIR%%|${DOCSDIR}|g' ${WRKSRC}/src/dmhelpmanager.pas
 	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' -e 's|%%DATADIR%%|${DATADIR}|g' \
@@ -65,7 +74,7 @@ do-build:
 	@cd ${WRKSRC}/components && \
 		${FIND} * -name *.lpk -exec ${LAZBUILD_CMD} --ws=${LCL_PLATFORM} "{}" \;
 	@cd ${WRKSRC} && \
-		${LAZBUILD_CMD} --ws=${LCL_PLATFORM} ${PROJECT_FILE}
+		${LAZBUILD_CMD} --ws=${LCL_PLATFORM} --bm="${BUILD_MODE}" ${PROJECT_FILE}
 
 post-build:
 	@${RM} -rf ${DOCSRC}/*/dev-help
@@ -96,7 +105,7 @@ pre-install:
 	@${ECHO_CMD} "@dirrm %%DATADIR%%/sdk" >> ${PLIST}
 	@${ECHO_CMD} "@dirrm %%DATADIR%%" >> ${PLIST}
 
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@cd ${DOCSRC} && \
 		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DOCSDIR%%/|' >> ${PLIST} && \
 			${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DOCSDIR%%/|' >> ${PLIST}
@@ -115,7 +124,7 @@ do-install:
 			${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/${DIRE}/{}" \;
 .endfor
 
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@cd ${DOCSRC} && \
 		${FIND} * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
 			${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
_______________________________________________
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"