port of p7zip, unix commandline versions of 7-zip
Responsible Changed From-To: freebsd-ports-bugs->sem Take it
Juergen Lock wrote: > Xp7zip/bin/7z > Xp7zip/bin/Codecs/7zAES.dll > Xp7zip/bin/Codecs/BZip2.dll > [...] These belong to libexec or %%DATADIR%%, see hier(7) > sed 's/^X//' >files/7z << 'END-of-files/7z' > X#! /bin/sh > XPROG=$(dirname $(realpath $0))/../p7zip/bin/7z > X > X$PROG "$@" Does this really work? > X-LOCAL_SHARED=-lpthread -lm > X+LOCAL_SHARED=-pthread Use PTHREAD_CFLAGS / PTHREAD_LIBS > X-LOCAL_LIBS=-lpthread -ldl -lm > X+LOCAL_LIBS=-pthread [...] > X-LOCAL_SHARED=-lpthread -lm > X+LOCAL_SHARED=-pthread See above. > X+#ifdef __FreeBSD__ Unless you plan to submit these patches upstream, I can assure you we are on FreeBSD. -Oliver
State Changed From-To: open->feedback Waiting for submitter feedback. If feedback will not received till 20040818, the PR will be closed.
OK, i've made a new shar, appended at the end: On Tue, Aug 03, 2004 at 09:28:55PM +0200, Oliver Eikemeier wrote: > Juergen Lock wrote: > > > Xp7zip/bin/7z > > Xp7zip/bin/Codecs/7zAES.dll > > Xp7zip/bin/Codecs/BZip2.dll > > [...] > > These belong to libexec or %%DATADIR%%, see hier(7) > Fixed. > > > sed 's/^X//' >files/7z << 'END-of-files/7z' > > X#! /bin/sh > > XPROG=$(dirname $(realpath $0))/../p7zip/bin/7z > > X > > X$PROG "$@" > > Does this really work? > :) It is needed because the 7z executable expects its shared lib directories relative to its path, so without this they would have to be placed below /usr/local/bin... > > X-LOCAL_SHARED=-lpthread -lm > > X+LOCAL_SHARED=-pthread > > Use PTHREAD_CFLAGS / PTHREAD_LIBS > Fixed. > > X-LOCAL_LIBS=-lpthread -ldl -lm > > X+LOCAL_LIBS=-pthread > [...] > > X-LOCAL_SHARED=-lpthread -lm > > X+LOCAL_SHARED=-pthread > See above. > > > X+#ifdef __FreeBSD__ > Unless you plan to submit these patches upstream, I can assure you we > are on FreeBSD. > Changed. > -Oliver Juergen # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # Makefile # pkg-descr # pkg-plist # distinfo # files/ # files/7z # files/patch-aa # files/patch-ab # files/patch-ac # files/patch-ba # echo x - Makefile sed 's/^X//' >Makefile << 'END-of-Makefile' X# New ports collection makefile for: p7zip X# Date created: Sun Jul 18 15:07:26 CEST 2004 X# Whom: Juergen Lock <nox@jelal.kn-bremen.de> X# X# $FreeBSD$ X# X XPORTNAME= p7zip XPORTVERSION= 0.90 XCATEGORIES= archivers XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= p7zip XDISTNAME= ${PORTNAME}_${PORTVERSION} X XMAINTAINER= nox@jelal.kn-bremen.de XCOMMENT= Command line versions of 7-zip X XUSE_BZIP2= yes XUSE_GMAKE= yes XMAKEFILE= makefile XMAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} XMAKE_ARGS+= PTHREAD_LIBS=${PTHREAD_LIBS} XONLY_FOR_ARCHS= alpha amd64 i386 ia64 X Xdo-install: X ${MKDIR} ${PREFIX}/libexec/p7zip/Codecs X ${MKDIR} ${PREFIX}/libexec/p7zip/Formats X ${INSTALL_PROGRAM} ${WRKSRC}/bin/7z ${PREFIX}/libexec/p7zip X ${INSTALL_PROGRAM} ${WRKSRC}/bin/7za ${PREFIX}/bin X ${INSTALL_DATA} ${WRKSRC}/bin/Codecs/* ${PREFIX}/libexec/p7zip/Codecs X ${INSTALL_DATA} ${WRKSRC}/bin/Formats/* ${PREFIX}/libexec/p7zip/Formats X ${INSTALL_SCRIPT} ${FILESDIR}/7z ${PREFIX}/bin X ${MKDIR} ${PREFIX}/share/doc/p7zip/commands X ${MKDIR} ${PREFIX}/share/doc/p7zip/switches X ${INSTALL_DATA} ${WRKSRC}/html/cmdline/*.htm ${PREFIX}/share/doc/p7zip X ${INSTALL_DATA} ${WRKSRC}/html/cmdline/commands/* ${PREFIX}/share/doc/p7zip/commands X ${INSTALL_DATA} ${WRKSRC}/html/cmdline/switches/* ${PREFIX}/share/doc/p7zip/switches X X.include <bsd.port.mk> END-of-Makefile echo x - pkg-descr sed 's/^X//' >pkg-descr << 'END-of-pkg-descr' Xp7zip is a port of 7z.exe and 7za.exe for Unix. X X7z and 7za are command line version of 7-zip, see http://www.7-zip.org/. X X7-Zip is a file archiver with highest compression ratio. X XCurrently, p7zip (like 7-zip) supports only little-endian machine. X X7z uses shared libraries and supports more archive formats, otherwise X7z and 7za work the same. They didn't come with a manpage, html Xcommandline documentation will be installed in %%PREFIX%%/share/doc/p7zip/ X X XWWW: http://p7zip.sourceforge.net/ END-of-pkg-descr echo x - pkg-plist sed 's/^X//' >pkg-plist << 'END-of-pkg-plist' Xbin/7z Xbin/7za Xlibexec/p7zip/7z Xlibexec/p7zip/Codecs/7zAES.dll Xlibexec/p7zip/Codecs/BZip2.dll Xlibexec/p7zip/Codecs/Copy.dll Xlibexec/p7zip/Codecs/Implode.dll Xlibexec/p7zip/Codecs/PPMD.dll Xlibexec/p7zip/Codecs/AES.dll Xlibexec/p7zip/Codecs/Branch.dll Xlibexec/p7zip/Codecs/Deflate.dll Xlibexec/p7zip/Codecs/LZMA.dll Xlibexec/p7zip/Codecs/Swap.dll Xlibexec/p7zip/Formats/7z.dll Xlibexec/p7zip/Formats/Rar.dll Xlibexec/p7zip/Formats/Tar.dll Xlibexec/p7zip/Formats/Zip.dll Xlibexec/p7zip/Formats/arj.dll Xlibexec/p7zip/Formats/bz2.dll Xlibexec/p7zip/Formats/cab.dll Xlibexec/p7zip/Formats/cpio.dll Xlibexec/p7zip/Formats/deb.dll Xlibexec/p7zip/Formats/gz.dll Xlibexec/p7zip/Formats/rpm.dll Xlibexec/p7zip/Formats/split.dll X%%PORTDOCS%%%%DOCSDIR%%/index.htm X%%PORTDOCS%%%%DOCSDIR%%/syntax.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/add.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/delete.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/extract.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/extract_full.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/index.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/list.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/test.htm X%%PORTDOCS%%%%DOCSDIR%%/commands/update.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/exclude.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/include.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/index.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/method.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/output_dir.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/overwrite.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/password.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/recurse.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/sfx.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/type.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/update.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/working_dir.htm X%%PORTDOCS%%%%DOCSDIR%%/switches/yes.htm X@dirrm libexec/p7zip/Formats X@dirrm libexec/p7zip/Codecs X@dirrm libexec/p7zip X%%PORTDOCS%%@dirrm %%DOCSDIR%%/commands X%%PORTDOCS%%@dirrm %%DOCSDIR%%/switches X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-pkg-plist echo x - distinfo sed 's/^X//' >distinfo << 'END-of-distinfo' XMD5 (p7zip_0.90.tar.bz2) = 6600fd9711b5cebd52aac2ce4d9ba727 XSIZE (p7zip_0.90.tar.bz2) = 447371 END-of-distinfo echo c - files/ mkdir -p files/ > /dev/null 2>&1 echo x - files/7z sed 's/^X//' >files/7z << 'END-of-files/7z' X#! /bin/sh XPROG=$(dirname $(realpath $0))/../libexec/p7zip/7z X X$PROG "$@" END-of-files/7z echo x - files/patch-aa sed 's/^X//' >files/patch-aa << 'END-of-files/patch-aa' XIndex: myWindows/makefile X@@ -1,8 +1,8 @@ X PROG=all.so X X-LOCAL_FLAGS=-I. -I.. -I../include_windows X+LOCAL_FLAGS=-I. -I.. -I../include_windows ${PTHREAD_CFLAGS} X X-LOCAL_SHARED=-lpthread -lm X+LOCAL_SHARED=${PTHREAD_LIBS} X X OBJS=myEvents.o myFiles.o myFindFile.o myDirectoryAndPath.o \ X myLastError.o myModuleFileName.o my_itow.o \ END-of-files/patch-aa echo x - files/patch-ab sed 's/^X//' >files/patch-ab << 'END-of-files/patch-ab' XIndex: 7zip/UI/Console/makefile X@@ -1,6 +1,6 @@ X PROG=../../../bin/7z X X-LOCAL_FLAGS= X+LOCAL_FLAGS=${PTHREAD_CFLAGS} X X OPERATING_SYSTEM=$(shell uname -o) X X@@ -8,7 +8,7 @@ X # Cygwin does not support -ldl X LOCAL_LIBS=-lpthread X else X-LOCAL_LIBS=-lpthread -ldl -lm X+LOCAL_LIBS=${PTHREAD_LIBS} X endif X X MY_WINDOWS=$(MY_HOME)/myDirectoryAndPath.o \ END-of-files/patch-ab echo x - files/patch-ac sed 's/^X//' >files/patch-ac << 'END-of-files/patch-ac' XIndex: 7zip/Bundles/Alone/makefile X@@ -6,7 +6,8 @@ X -DFORMAT_GZIP -DCOMPRESS_LZMA -DCOMPRESS_BCJ_X86 -DCOMPRESS_BCJ2 \ X -DCOMPRESS_COPY -DCOMPRESS_MF_PAT -DCOMPRESS_MF_BT -DCOMPRESS_MF_HC \ X -DCOMPRESS_MF_MT -DCOMPRESS_PPMD -DCOMPRESS_DEFLATE -DCOMPRESS_DEFLATE64 \ X--DCOMPRESS_IMPLODE -DCOMPRESS_BZIP2 -DCRYPTO_ZIP -DCRYPTO_7ZAES -DCRYPTO_AES X+-DCOMPRESS_IMPLODE -DCOMPRESS_BZIP2 -DCRYPTO_ZIP -DCRYPTO_7ZAES -DCRYPTO_AES \ X+${PTHREAD_CFLAGS} X X MY_WINDOWS=$(MY_HOME)/myEvents.o \ X $(MY_HOME)/myFiles.o \ X@@ -21,7 +22,7 @@ X $(MY_HOME)/wine_strings.o \ X $(MY_HOME)/stuff_for_cygwin.o X X-LOCAL_SHARED=-lpthread -lm X+LOCAL_SHARED=${PTHREAD_LIBS} X X X OBJS=\ END-of-files/patch-ac echo x - files/patch-ba sed 's/^X//' >files/patch-ba << 'END-of-files/patch-ba' XIndex: Windows/Time.h X@@ -41,7 +41,7 @@ X fileTime.dwHighDateTime = DWORD(ll >> 32); X } X X-inline bool FileTimeToUnixTime(const FILETIME &fileTime, long &unixTime) X+inline bool FileTimeToUnixTime(const FILETIME &fileTime, time_t &unixTime) X { X UINT64 winTime = (((UINT64)fileTime.dwHighDateTime) << 32) + fileTime.dwLowDateTime; X if (winTime < kUnixTimeStartValue) X@@ -49,7 +49,7 @@ X winTime = (winTime - kUnixTimeStartValue) / kNumTimeQuantumsInSecond; X if (winTime >= 0xFFFFFFFF) X return false; X- unixTime = (long)winTime; X+ unixTime = (time_t)winTime; X return true; X } X END-of-files/patch-ba exit
Does not build on 4.x: g++ -w -O2 -s -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DENV_UNIX -DNDEBUG -D_REENTRANT -I. -I.. -I../include_windows -D_THREAD_SAFE -I../../../ -I../../../include_windows -I../../../myWindows -O -pipe -march=pentiumpro -w -O2 -s -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DENV_UNIX -DNDEBUG -D_REENTRANT -I. -I.. -I../include_windows -D_THREAD_SAFE -I../../../ -I../../../include_windows -I../../../myWindows -c -o wine_strings.o wine_strings.cpp wine_strings.cpp: In function `int strncmpiW(const WCHAR *, const WCHAR *, int)': wine_strings.cpp:86: implicit declaration of function `int towupper(...)' wine_strings.cpp: In function `WCHAR * strlwrW(WCHAR *)': wine_strings.cpp:155: implicit declaration of function `int towlower(...)' wine_strings.cpp: In function `CHAR * CharNextA(const CHAR *)': wine_strings.cpp:180: implicit declaration of function `int mbrtowc(...)' gmake[1]: *** [wine_strings.o] Error 1 gmake[1]: Leaving directory `/spool1/build/spool1/build/p7zip/work/p7zip_0.90/myWindows' -- Sem.
On Wed, Aug 11, 2004 at 10:28:04AM +0400, Sergey Matveychuk wrote: > Does not build on 4.x: > > g++ -w -O2 -s -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -DENV_UNIX -DNDEBUG -D_REENTRANT -I. -I.. -I../include_windows > -D_THREAD_SAFE -I../../../ -I../../../include_windows > -I../../../myWindows -O -pipe -march=pentiumpro -w -O2 -s -fPIC > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DENV_UNIX -DNDEBUG > -D_REENTRANT -I. -I.. -I../include_windows -D_THREAD_SAFE -I../../../ > -I../../../include_windows -I../../../myWindows -c -o wine_strings.o > wine_strings.cpp > wine_strings.cpp: In function `int strncmpiW(const WCHAR *, const WCHAR > *, int)': > wine_strings.cpp:86: implicit declaration of function `int towupper(...)' > wine_strings.cpp: In function `WCHAR * strlwrW(WCHAR *)': > wine_strings.cpp:155: implicit declaration of function `int towlower(...)' > wine_strings.cpp: In function `CHAR * CharNextA(const CHAR *)': > wine_strings.cpp:180: implicit declaration of function `int mbrtowc(...)' > gmake[1]: *** [wine_strings.o] Error 1 > gmake[1]: Leaving directory > `/spool1/build/spool1/build/p7zip/work/p7zip_0.90/myWindows' > > -- > Sem. Indeed. This marks it BROKEN for that case: Index: Makefile @@ -22,6 +22,12 @@ MAKE_ARGS+= PTHREAD_LIBS=${PTHREAD_LIBS} ONLY_FOR_ARCHS= alpha amd64 i386 ia64 +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500039 +BROKEN= "Requires wchar functions (mbrtowc(3) etc.) for compilation" +.endif + do-install: ${MKDIR} ${PREFIX}/libexec/p7zip/Codecs ${MKDIR} ${PREFIX}/libexec/p7zip/Formats @@ -36,4 +42,4 @@ ${INSTALL_DATA} ${WRKSRC}/html/cmdline/commands/* ${PREFIX}/share/doc/p7zip/commands ${INSTALL_DATA} ${WRKSRC}/html/cmdline/switches/* ${PREFIX}/share/doc/p7zip/switches -.include <bsd.port.mk> +.include <bsd.port.post.mk>
State Changed From-To: feedback->closed Committed, thanks!