aboutsummaryrefslogtreecommitdiffstats
path: root/cad
diff options
context:
space:
mode:
authormr <mr@FreeBSD.org>2009-05-02 16:27:09 +0800
committermr <mr@FreeBSD.org>2009-05-02 16:27:09 +0800
commit560b18b0420415f9c024394c7d154ecf3bc6285b (patch)
tree1802c5c5155fe76bd87aa078c1457b77a42fb8ad /cad
parent1bee448fb82aaa21fb94023d6cad3dbc0a181179 (diff)
downloadfreebsd-ports-gnome-560b18b0420415f9c024394c7d154ecf3bc6285b.tar.gz
freebsd-ports-gnome-560b18b0420415f9c024394c7d154ecf3bc6285b.tar.zst
freebsd-ports-gnome-560b18b0420415f9c024394c7d154ecf3bc6285b.zip
The attached patches achieve the following improvements:
* cad/qcad itself: 1. Enable parallel build. This is safe, because the vendor's script supports it (but only, when one is using distcc). 2. Remove the special handling for Alpha. I guess, this is a historical wart -- the current version of qcad compiles on my amd64 with `-Wall -W' without any warnings. If Alpha bites again, the wart can be put back until someone tracks the bug down. * cad/qcad-partslib: 1. Fetch the .tar.gz, rather than .zip variant of the distribution. This new file is more than twice smaller. 2. Remove build-dependency on qcad -- this is useless for a pure-data port and only complicates package building and installation (a PORTREVISION bump in qcad itself, for example, will necessitate rebuilding partslib without any good reason). 3. Don't create an intermediate extraction under ${WRKSRC} for the sole purpose of creating PLIST -- extract from ${DISTFILE} into ${DATADIR} directly and use tar's output to create PLIST on the fly. This saves a ton of I/O and diskspace during packaging. Submitted by: Mikhail T. <mi+thun [at] aldan.algebra.com>
Diffstat (limited to 'cad')
-rw-r--r--cad/qcad-partslib/Makefile40
-rw-r--r--cad/qcad-partslib/distinfo6
-rw-r--r--cad/qcad/Makefile7
3 files changed, 27 insertions, 26 deletions
diff --git a/cad/qcad-partslib/Makefile b/cad/qcad-partslib/Makefile
index 0fe884e7ef30..5dd11c1ea34e 100644
--- a/cad/qcad-partslib/Makefile
+++ b/cad/qcad-partslib/Makefile
@@ -11,31 +11,33 @@ PORTREVISION= 2
CATEGORIES= cad
MASTER_SITES= ftp://www.ribbonsoft.com/archives/partlibrary/
DISTNAME= partlibrary-${PORTVERSION:S/.1$/-1/}
+EXTRACT_ONLY=
MAINTAINER= mr@FreeBSD.org
COMMENT= Professional CAD system
-BUILD_DEPENDS= qcad:${PORTSDIR}/cad/qcad
-
WRKSRC= ${WRKDIR}/partlibrary-${PORTVERSION:S/.1$/-1/}
-DATADIR= ${PREFIX}/share/qcad/library
+DATADIR= share/qcad/library
-USE_ZIP= yes
NO_BUILD= yes
-PLIST= ${WRKDIR}/pkg-plist
-
-.include <bsd.port.pre.mk>
-
-pre-install:
- @${ECHO_CMD} '@exec mkdir -p %D/share/qcad/libraries' > ${PLIST}
- @${FIND} ${WRKSRC} -type f | \
- ${SED} -e "s:^${WRKSRC}/:share/qcad/library/:g" >> ${PLIST}
- @${FIND} -d ${WRKSRC} -type d | \
- ${SED} -e "s:^${WRKSRC}:@dirrm share/qcad/library:g" >> ${PLIST}
do-install:
- @${MKDIR} ${DATADIR}
- ${TAR} -C ${WRKSRC} --exclude CVS -cf - . | \
- ${TAR} -C ${DATADIR} --unlink -xf -
-
-.include <bsd.port.post.mk>
+ @${MKDIR} ${PREFIX}/${DATADIR}
+ ${TAR} -C ${PREFIX}/${DATADIR} --exclude CVS --unlink --strip-components 1 \
+ -xovf ${_DISTDIR}${DISTFILES} 2>&1 | ${AWK} ' \
+ $$1 != "x" { \
+ print "ERROR: " $$0 > "/dev/stderr"; exit 1 \
+ } { \
+ if (sub("/$$", "", $$2)) \
+ dirs[$$2] = 1; \
+ else if ($$2 != "") \
+ print "${DATADIR}/" $$2; \
+ next \
+ } END { \
+ for (d in dirs) \
+ print "@dirrm ${DATADIR}/" d |"sort -r" \
+ }' >> ${TMPPLIST}
+ @${ECHO_CMD} '@dirrm ${DATADIR}' >> ${TMPPLIST}
+ @${ECHO_CMD} '@unexec rmdir ${DATADIR:H} 2>/dev/null || true' >> ${TMPPLIST}
+
+.include <bsd.port.mk>
diff --git a/cad/qcad-partslib/distinfo b/cad/qcad-partslib/distinfo
index 73cfc43625e0..c9e2daad8dd2 100644
--- a/cad/qcad-partslib/distinfo
+++ b/cad/qcad-partslib/distinfo
@@ -1,3 +1,3 @@
-MD5 (partlibrary-2.1.2.8-1.zip) = 1b4409690ee0619df9d8a1ac011bec1a
-SHA256 (partlibrary-2.1.2.8-1.zip) = 33b12496a111b08d51ba1df3dfd4b13be5fe731dbd57a4a3ffc889c56f645129
-SIZE (partlibrary-2.1.2.8-1.zip) = 25016872
+MD5 (partlibrary-2.1.2.8-1.tar.gz) = e1df98084317b13bfc193fecba9d6790
+SHA256 (partlibrary-2.1.2.8-1.tar.gz) = f27b08051d1551087b7d7ad49cefb746202d75fcd9ad594c0044e54439b523c6
+SIZE (partlibrary-2.1.2.8-1.tar.gz) = 11629961
diff --git a/cad/qcad/Makefile b/cad/qcad/Makefile
index 6b97afb95b96..9c0f058e0656 100644
--- a/cad/qcad/Makefile
+++ b/cad/qcad/Makefile
@@ -27,17 +27,16 @@ USE_GMAKE= yes
PLIST= ${WRKDIR}/pkg-plist
MAKE_ENV= QTDIR="${QTDIR}" MAKE="${GMAKE}" \
QMAKESPEC="${LOCALBASE}/share/qt/mkspecs/freebsd-g++"
+MAKE_JOBS_SAFE= yes
.include <bsd.port.pre.mk>
-.if ${ARCH} == "alpha"
-CFLAGS+= -O0
-.endif
-
post-patch:
${REINPLACE_CMD} -e 's:RS_SYSTEM->getAppDir()+"/bin":"${PREFIX}/bin":' \
-e 's:RS_SYSTEM->getDocPath() + "/qcaddoc.adp":"${DOCSDIR}/qcaddoc.adp":' \
${WRKSRC}/qcad/src/qc_applicationwindow.cpp
+ ${REINPLACE_CMD} -e 's,MAKE=gmake,MAKE="gmake ${_MAKE_JOBS}",' \
+ ${WRKSRC}/scripts/build_qcad.sh
do-build:
cd ${WRKSRC}/scripts && ${SETENV} ${MAKE_ENV} bash ./build_qcad.sh notrans