pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48261: p7zip cannot work with WIM archives



>Number:         48261
>Category:       pkg
>Synopsis:       p7zip cannot work with WIM archives
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 03 07:25:00 +0000 2013
>Originator:     Nat Sloss
>Release:        pkgsrc-2013Q2
>Organization:
>Environment:
NetBSD beast 6.99.23 NetBSD 6.99.23 (LOCKDEBUG) #4: Wed Jul 17 22:24:41 EST 
2013  build@beast:/usr/src/sys/arch/i386/compile/obj/LOCKDEBUG i386
>Description:
p7zip information states that it works with Windows Image files WIM.

However in the version built with pkgsrc it does not.

Support is built into 7z.so if the package is build with variable DYNAMIC_7Z= 
YES.

After having done that the library is not installed and is not in the PLIST.

If these problems are fixed, you will not be able to open any archives as it 
looks to 7z.so in the directory that is prefixed to 7z ie.

If you call 7z it will say it is unable to find ./7z.so,
if you call /usr/pkg/bin/7z it will say unable to find /usr/pkg/bin/7z.so.

>How-To-Repeat:
Try the following:

7z l 'WIM archive'

and it wont list the contents.
>Fix:
Apply these patches:

Index: ./pkgsrc/archivers/p7zip/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/p7zip/Makefile,v
retrieving revision 1.50
diff -u -r1.50 Makefile
--- ./pkgsrc/archivers/p7zip/Makefile   21 Mar 2011 13:45:51 -0000      1.50
+++ ./pkgsrc/archivers/p7zip/Makefile   3 Oct 2013 07:05:01 -0000
@@ -23,7 +23,7 @@
 PLIST_VARS=            dll
 
 # compiles, but does not recognize any archives as supported
-DYNAMIC_7Z=            NO
+DYNAMIC_7Z=            YES
 .if !empty(DYNAMIC_7Z:MYES)
 BUILD_TARGET=          all2
 PLIST.dll=             yes
@@ -54,7 +54,8 @@
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/bin/7za ${DESTDIR}${PREFIX}/bin
 .if !empty(DYNAMIC_7Z:MYES)
-       ${INSTALL_PROGRAM} ${WRKSRC}/bin/7z ${DESTDIR}${PREFIX}/lib/7z
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/7z.so ${DESTDIR}${PREFIX}/lib/7z.so
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/7z ${DESTDIR}${PREFIX}/lib/7z/7z
        ln -f -s ${PREFIX}/lib/7z/7z ${DESTDIR}${PREFIX}/bin
        ${INSTALL_LIB} ${WRKSRC}/bin/Codecs/* \
                ${DESTDIR}${PREFIX}/lib/7z/Codecs
--- /dev/null   2013-10-03 04:00:42.000000000 +1000
+++ ./pkgsrc/archivers/p7zip/patches/patch-CPP_7zip_UI_Common_LoadCodecs.cpp    
2013-09-30 12:36:59.000000000 +1000
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- CPP/7zip/UI/Common/LoadCodecs.cpp.orig     2011-01-22 19:46:28.000000000 
+0000
++++ CPP/7zip/UI/Common/LoadCodecs.cpp
+@@ -43,8 +43,12 @@ static CSysString GetLibraryFolderPrefix
+   int pos = path.ReverseFind(TEXT(CHAR_PATH_SEPARATOR));
+   return path.Left(pos + 1);
+   #else
++  #if defined(__NetBSD__)
++  const char *p7zip_home_dir = "/usr/pkg/lib/";
++  #else
+   const char *p7zip_home_dir = getenv("P7ZIP_HOME_DIR");
+   if (p7zip_home_dir == 0) p7zip_home_dir="./";
++  #endif
+ #ifdef _UNICODE
+   return MultiByteToUnicodeString(p7zip_home_dir);
+ #else
Index: ./pkgsrc/archivers/p7zip/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/p7zip/PLIST,v
retrieving revision 1.17
diff -u -r1.17 PLIST
--- ./pkgsrc/archivers/p7zip/PLIST      21 Mar 2011 13:45:51 -0000      1.17
+++ ./pkgsrc/archivers/p7zip/PLIST      3 Oct 2013 07:05:56 -0000
@@ -1,6 +1,7 @@
 @comment $NetBSD: PLIST,v 1.17 2011/03/21 13:45:51 adam Exp $
 bin/7z
 bin/7za
+${PLIST.dll}lib/7z.so
 ${PLIST.dll}lib/7z/7z
 ${PLIST.dll}lib/7z/Codecs/Rar29.so
 man/man1/7z.1


This allows 7zip to open WIM files as well as the usual formats.

Regards,

Nat.



Home | Main Index | Thread Index | Old Index