summaryrefslogtreecommitdiff
path: root/deskutils/cdcat
diff options
context:
space:
mode:
authorDennis Herrmann <dhn@FreeBSD.org>2011-08-31 21:43:15 +0000
committerDennis Herrmann <dhn@FreeBSD.org>2011-08-31 21:43:15 +0000
commit8858a13f58d4acddda5824de9faf7d87403237d5 (patch)
treeabb819c067266fb9d91a7a32f9d212b9b4dd4ed4 /deskutils/cdcat
parent- Update to 0.2.4.2 (diff)
- Update to 1.5
PR: ports/160091 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
Diffstat (limited to 'deskutils/cdcat')
-rw-r--r--deskutils/cdcat/Makefile71
-rw-r--r--deskutils/cdcat/distinfo6
-rw-r--r--deskutils/cdcat/files/patch-7zipLibrary.cpp34
3 files changed, 89 insertions, 22 deletions
diff --git a/deskutils/cdcat/Makefile b/deskutils/cdcat/Makefile
index 91db9d53bd62..19f46d51153e 100644
--- a/deskutils/cdcat/Makefile
+++ b/deskutils/cdcat/Makefile
@@ -6,9 +6,13 @@
#
PORTNAME= cdcat
-PORTVERSION= 1.3
+PORTVERSION= 1.5
CATEGORIES= deskutils
-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} \
+ GOOGLE_CODE:lib7zip
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ ${L7Z_DISTFILE}:lib7zip
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= A QT based tool for offline CD/DVD/disk catalogs
@@ -16,41 +20,68 @@ COMMENT= A QT based tool for offline CD/DVD/disk catalogs
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/archivers/p7zip:patch \
+ ${NONEXISTENT}:${PORTSDIR}/multimedia/mediainfo:patch
+LIB_DEPENDS= tar.0:${PORTSDIR}/devel/libtar
+
BUILD_WRKSRC= ${WRKSRC}/src
+PROJECTHOST= lib7zip
USE_BZIP2= yes
USE_QT_VER= 4
QT_COMPONENTS= corelib gui qt3support xml \
linguist_build moc_build qmake_build uic_build
MAKE_JOBS_SAFE= yes
+QMAKEFLAGS+= INCLUDEPATH+="${L7Z_WRKSRC}/Lib7Zip" \
+ INCLUDEPATH+="${MIF_WRKSRC}/MediaInfoLib/Source" \
+ LIBS+="${L7Z_WRKSRC}/Lib7Zip/lib7zip.a"
LRELEASE= ${QT_PREFIX}/bin/lrelease-qt4
+PORTDOCS= Authors ChangeLog README TRANSLATORS_README
+PLIST_FILES= bin/${PORTNAME} %%DATADIR%%/${PORTNAME}.png
+.for lang in cz de el es fr hu id it pl pt sk sr
+PLIST_FILES+= %%DATADIR%%/translations/${PORTNAME}_${lang}.qm
+.endfor
+PLIST_DIRS= %%DATADIR%%/translations %%DATADIR%%
+
+L7Z_NAME= lib7zip
+L7Z_VERSION= 1.4.1
+L7Z_DISTFILE= ${L7Z_NAME}-${L7Z_VERSION}.tar.gz
+L7Z_WRKSRC= ${WRKDIR}/${L7Z_NAME}
+
.include <bsd.port.pre.mk>
-PORTDOCS= Authors ChangeLog README TRANSLATORS_README
-PLIST_FILES= bin/cdcat \
- %%DATADIR%%/cdcat.png \
- %%DATADIR%%/translations/cdcat_cz.qm \
- %%DATADIR%%/translations/cdcat_de.qm \
- %%DATADIR%%/translations/cdcat_el.qm \
- %%DATADIR%%/translations/cdcat_es.qm \
- %%DATADIR%%/translations/cdcat_hu.qm \
- %%DATADIR%%/translations/cdcat_id.qm \
- %%DATADIR%%/translations/cdcat_pl.qm \
- %%DATADIR%%/translations/cdcat_pt.qm \
- %%DATADIR%%/translations/cdcat_sk.qm
-PLIST_DIRS= %%DATADIR%%/translations \
- %%DATADIR%%
+P7Z_WRKSRC!= cd ${PORTSDIR}/archivers/p7zip && ${MAKE} -V WRKSRC
+MIF_WRKSRC!= cd ${PORTSDIR}/multimedia/mediainfo && ${MAKE} -V WRKSRC
+
+post-extract:
+ @${GZCAT} ${DISTDIR}/${L7Z_DISTFILE} | (cd ${WRKDIR} && ${TAR} -xf -)
+ @${LN} -sf ${L7Z_NAME}-${L7Z_VERSION} ${L7Z_WRKSRC}
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-ldl .*||g' ${BUILD_WRKSRC}/${PORTNAME}.pro
+ @${REINPLACE_CMD} -e 's|-ldl||g' ${L7Z_WRKSRC}/Test7Zip/Makefile.in
+
+pre-configure:
+ @cd ${L7Z_WRKSRC} && ./configure --disable-shared \
+ CC="${CC}" CFLAGS="${CFLAGS}" \
+ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
+ P7ZIP_SOURCE_DIR="${P7Z_WRKSRC}"
do-configure:
- @${LRELEASE} ${BUILD_WRKSRC}/cdcat.pro
- @cd ${BUILD_WRKSRC} && ${QMAKE} cdcat.pro ${QMAKEFLAGS}
+ @${LRELEASE} ${BUILD_WRKSRC}/${PORTNAME}.pro
+ @cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} \
+ ${PORTNAME}.pro ${QMAKEFLAGS}
+
+pre-build:
+ @cd ${L7Z_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} \
+ ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
do-install:
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/cdcat ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${PREFIX}/bin
@${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/cdcat.png ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.png ${DATADIR}
@${MKDIR} ${DATADIR}/translations
${INSTALL_DATA} ${BUILD_WRKSRC}/lang/*.qm ${DATADIR}/translations
.if !defined(NOPORTDOCS)
diff --git a/deskutils/cdcat/distinfo b/deskutils/cdcat/distinfo
index 021826d9cc39..53173eba23a8 100644
--- a/deskutils/cdcat/distinfo
+++ b/deskutils/cdcat/distinfo
@@ -1,2 +1,4 @@
-SHA256 (cdcat-1.3.tar.bz2) = bd8595de036ee64783ba6e14a865c9e588072735d0315ff1484528d518baf6a1
-SIZE (cdcat-1.3.tar.bz2) = 248555
+SHA256 (cdcat-1.5.tar.bz2) = 586aa5885418b6e4be7fcf888cfa249ec97b4b70a95fefe568ed826094d645a4
+SIZE (cdcat-1.5.tar.bz2) = 287378
+SHA256 (lib7zip-1.4.1.tar.gz) = 20efb640c43c5d05e1f8d641eb0d01f8712648fe7989f275ec5b2997641316d9
+SIZE (lib7zip-1.4.1.tar.gz) = 95080
diff --git a/deskutils/cdcat/files/patch-7zipLibrary.cpp b/deskutils/cdcat/files/patch-7zipLibrary.cpp
new file mode 100644
index 000000000000..4164806e6212
--- /dev/null
+++ b/deskutils/cdcat/files/patch-7zipLibrary.cpp
@@ -0,0 +1,34 @@
+--- ../lib7zip/Lib7Zip/7zipLibrary.cpp.orig 2011-07-24 08:14:18.000000000 +0900
++++ ../lib7zip/Lib7Zip/7zipLibrary.cpp 2011-08-06 16:31:37.000000000 +0900
+@@ -35,6 +35,13 @@
+ #define HMODULE void *
+ #endif
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#if (__FreeBSD_version < 900000 && __FreeBSD_version >= 800501) || (__FreeBSD_version >= 900006)
++#define HAVE_SCANDIR_POSIX
++#endif
++#endif
++
+ /*-------------- const defines ---------------------------*/
+ const UInt64 kMaxCheckStartPosition = 1 << 22;
+
+@@ -819,7 +826,7 @@
+ }
+ #else
+
+-#if defined(__WXMAC__) || defined(__APPLE__)
++#if defined(__WXMAC__) || defined(__APPLE__) || !defined(HAVE_SCANDIR_POSIX)
+ int myselect(struct dirent * pDir );
+ #else
+ int myselect(const struct dirent * pDir );
+@@ -856,7 +863,7 @@
+ return true;
+ }
+
+-#if defined(__WXMAC__) || defined(__APPLE__)
++#if defined(__WXMAC__) || defined(__APPLE__) || !defined(HAVE_SCANDIR_POSIX)
+ int myselect(struct dirent * pDir )
+ #else
+ int myselect(const struct dirent * pDir )