aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2015-01-11 03:22:51 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2015-01-11 03:22:51 +0000
commitc7b8d389884aa604ee9c7adbe014c567aa47538e (patch)
treecc496ffe05e0770b101f5b59e2aa64db835aa275 /comms
parent54a12ed5cbdf38f74e2f8a88a8427e801b2f597b (diff)
downloadports-c7b8d389884aa604ee9c7adbe014c567aa47538e.tar.gz
ports-c7b8d389884aa604ee9c7adbe014c567aa47538e.zip
Notes
Diffstat (limited to 'comms')
-rw-r--r--comms/cqrlog/Makefile40
-rw-r--r--comms/cqrlog/files/environmentoptions.xml.in2
-rw-r--r--comms/cqrlog/files/patch-Makefile9
3 files changed, 34 insertions, 17 deletions
diff --git a/comms/cqrlog/Makefile b/comms/cqrlog/Makefile
index fb21614d1cee..e93770046278 100644
--- a/comms/cqrlog/Makefile
+++ b/comms/cqrlog/Makefile
@@ -3,6 +3,7 @@
PORTNAME= cqrlog
PORTVERSION= 1.8.2
+PORTREVISION= 1
CATEGORIES= comms hamradio
MASTER_SITES= http://www.cqrlog.com/files/cqrlog_${PORTVERSION}/ \
${MASTER_SITE_LOCAL}
@@ -18,24 +19,36 @@ BUILD_DEPENDS= lazbuild:${PORTSDIR}/editors/lazarus
LIB_DEPENDS= libhamlib.so:${PORTSDIR}/comms/hamlib
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USE_FPC= gtk2
+USE_FPC= yes
+WANT_GNOME= yes
ALL_TARGET= ${PORTNAME}
-GETLAZDIR= ${AWK} '/cd .* .* exit/ { print $$2 }' ${LOCALBASE}/bin/lazarus
+LAZARUS_VER= 1.2.6
+LAZARUS_DIR= ${LOCALBASE}/share/lazarus-${LAZARUS_VER}
-pre-build:
- ${REINPLACE_CMD} -e s!%%LAZSHAREDIR%%!`${GETLAZDIR}`!g \
- ${WRKSRC}/environmentoptions.xml
- # We're basically copying the entire editors/lazarus
- # port into WRKSRC since lazbuild modifies all sorts
- # of files in the lazarus dir during builds.
- ${CP} -R `${GETLAZDIR}` ${WRKSRC}/lazdir
- ${CHMOD} -R u+w ${WRKSRC}/lazdir
+OPTIONS_SINGLE= LCL
+OPTIONS_SINGLE_LCL= GTK2 QT4
+OPTIONS_DEFAULT= GTK2
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MGTK2}
+USE_FPC+= gtk2
+USE_GNOME= gtk20
+LCL_PLATFORM= gtk2
+BUILD_DEPENDS+= ${LAZARUS_DIR}/lcl/units/${BUILDNAME}/${LCL_PLATFORM}/interfaces.ppu:${PORTSDIR}/editors/lazarus-lcl-gtk2
+.endif
+
+.if ${PORT_OPTIONS:MQT4}
+LIB_DEPENDS+= libQt4Pas.so:${PORTSDIR}/x11-toolkits/qt4pas
+LCL_PLATFORM= qt
+BUILD_DEPENDS+= ${LAZARUS_DIR}/lcl/units/${BUILDNAME}/${LCL_PLATFORM}/interfaces.ppu:${PORTSDIR}/editors/lazarus-lcl-qt
+.endif
post-patch:
@${SED} -e s!%%LOCALBASE%%!${LOCALBASE}!g \
-e s!%%MAKE_CMD%%!${MAKE_CMD}!g \
- -e s!%%WRKSRC%%!${WRKSRC}!g \
+ -e s!%%LAZARUSDIR%%!${LAZARUS_DIR}!g \
${FILESDIR}/environmentoptions.xml.in \
> ${WRKSRC}/environmentoptions.xml
${REINPLACE_CMD} -e s!%%LOCALBASE%%!${LOCALBASE}!g \
@@ -45,5 +58,8 @@ post-patch:
${WRKSRC}/src/fGrayline.pas
${REINPLACE_CMD} -e s!%%PREFIX%%!${PREFIX}!g \
${WRKSRC}/src/dData.pas ${WRKSRC}/src/fGrayline.pas
+ ${REINPLACE_CMD} -e s!%%LAZARUSDIR%%!${LAZARUS_DIR}!g \
+ -e s!%%LCL_PLATFORM%%!${LCL_PLATFORM}!g \
+ ${WRKSRC}/Makefile
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/comms/cqrlog/files/environmentoptions.xml.in b/comms/cqrlog/files/environmentoptions.xml.in
index 4c13240fe2e1..865650924137 100644
--- a/comms/cqrlog/files/environmentoptions.xml.in
+++ b/comms/cqrlog/files/environmentoptions.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<EnvironmentOptions>
- <LazarusDirectory Value="%%WRKSRC%%/lazdir"/>
+ <LazarusDirectory Value="%%LAZARUSDIR%%"/>
<MakeFilename Value="%%MAKE_CMD%%"/>
<CompilerFilename Value="%%LOCALBASE%%/bin/fpc"/>
</EnvironmentOptions>
diff --git a/comms/cqrlog/files/patch-Makefile b/comms/cqrlog/files/patch-Makefile
index deadeca3ed49..a1435b226d6a 100644
--- a/comms/cqrlog/files/patch-Makefile
+++ b/comms/cqrlog/files/patch-Makefile
@@ -1,7 +1,8 @@
---- Makefile.orig 2014-04-13 05:14:38.000000000 -0700
-+++ Makefile 2014-07-01 04:04:04.000000000 -0700
+--- Makefile 2014-10-03 14:37:57.000000000 -0500
++++ Makefile 2015-01-10 21:44:03.000000000 -0500
@@ -1,11 +1,12 @@
- CC=lazbuild
+-CC=lazbuild
++CC=lazbuild -d
ST=strip
-datadir = $(DESTDIR)/usr/share/cqrlog
-bindir = $(DESTDIR)/usr/bin
@@ -13,7 +14,7 @@
cqrlog: src/cqrlog.lpi
- $(CC) --ws=gtk2 src/cqrlog.lpi
-+ $(CC) --pcp=. --ws=gtk2 src/cqrlog.lpi
++ $(CC) --pcp=. --ws=%%LCL_PLATFORM%% src/cqrlog.lpi --lazarusdir=%%LAZARUSDIR%%
$(ST) src/cqrlog
gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz