Changeset 99380


Ignore:
Timestamp:
Nov 4, 2012, 9:14:50 AM (12 years ago)
Author:
ryandesign@…
Message:

unrar: integrate libunrar as a subport, thereby updating it to 4.2.4; fix libunrar.dylib install_name; presumably fix install on non-Darwin OSes; for main unrar port, installs_libs no; maintainers krischik openmaintainer as standalone libunrar port was

Location:
trunk/dports/archivers
Files:
1 deleted
1 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/archivers/unrar/Portfile

    r99378 r99380  
    1010license         Restrictive/Distributable
    1111platforms       darwin freebsd
    12 maintainers     nomaintainer
     12maintainers             krischik openmaintainer
    1313description     Extract, view & test RAR archives
    1414
     
    2525                    sha256  9432bf798e5f7123f3060f37b75b7c07f36f0091305f46473dcae9154f8cd686
    2626
    27 patchfiles      patch-makefile.unix.diff
     27patchfiles              patch-dll.hpp.diff \
     28                        patch-makefile.unix.diff
    2829
    2930worksrcdir      ${name}
     
    3738}
    3839
    39 build.env-append    CXX="[join ${configure.cxx}]" \
    40                     CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
    41                     LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
     40build.args              -f makefile.unix \
     41                        CXX="[join ${configure.cxx}]"
    4242
    43 build.args      -f makefile.unix
     43# The makefile misuses the DESTDIR variable as if it were PREFIX. We need it at
     44# build time so the library gets the correct install_name.
     45build.args-append       DESTDIR=${prefix}
    4446
    45 destroot {
    46         set docdir ${prefix}/share/doc/${name}
    47 
    48         xinstall -d ${destroot}${docdir}
    49         xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
    50         xinstall -m 0644 -W ${worksrcpath} license.txt readme.txt ${destroot}${docdir}
     47pre-build {
     48    build.args-append   CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
     49                        LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
    5150}
    5251
    53 livecheck.type  regex
    54 livecheck.url   ${homepage}rar_add.htm
    55 livecheck.regex ${my_name}-(\\d+(?:\\.\\d+)*)
     52post-destroot {
     53    set docdir ${prefix}/share/doc/${subport}
     54    xinstall -d ${destroot}${docdir}
     55    xinstall -m 644 -W ${worksrcpath} license.txt readme.txt ${destroot}${docdir}
     56}
     57
     58platform darwin {
     59    patchfiles-append   patch-dylib.diff
     60}
     61
     62if {${name} == ${subport}} {
     63    installs_libs       no
     64   
     65    destroot {
     66        xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin
     67    }
     68   
     69    livecheck.type      regex
     70    livecheck.url       ${homepage}rar_add.htm
     71    livecheck.regex     ${my_name}-(\\d+(?:\\.\\d+)*)
     72} else {
     73    livecheck.type      none
     74}
     75
     76subport libunrar {
     77    description         unrar library
     78    long_description    ${description}
     79   
     80    # Copied from standalone libunrar port. Why do we need these?
     81    configure.cxxflags-append -DSILENT -DGUI
     82   
     83    # The makefile adds -fPIC to the CXXFLAGS when building the library, but we
     84    # override the CXXFLAGS with our own, so we have to manually add this again.
     85    configure.cxxflags-append -fPIC
     86   
     87    build.target        lib
     88   
     89    destroot {
     90        xinstall -d ${destroot}${prefix}/include/unrar
     91        xinstall -m 644 ${worksrcpath}/dll.hpp ${destroot}${prefix}/include/unrar
     92        if {${os.platform} == "darwin"} {
     93            xinstall ${worksrcpath}/libunrar.dylib ${destroot}${prefix}/lib
     94        } else {
     95            xinstall ${worksrcpath}/libunrar.so ${destroot}${prefix}/lib
     96        }
     97    }
     98}
  • trunk/dports/archivers/unrar/files/patch-dll.hpp.diff

    r99375 r99380  
    1 --- dll.hpp     2008-11-06 01:37:37.000000000 +0100
    2 +++ dll.hpp     2008-11-06 01:38:47.000000000 +0100
    3 @@ -28,14 +28,12 @@
     1--- dll.hpp.orig        2012-06-09 08:21:04.000000000 -0500
     2+++ dll.hpp     2012-11-04 02:52:55.000000000 -0600
     3@@ -30,14 +30,12 @@
    44 
    5  #define RAR_DLL_VERSION       4
     5 #define RAR_DLL_VERSION       5
    66 
    77-#ifdef _UNIX
  • trunk/dports/archivers/unrar/files/patch-dylib.diff

    r99375 r99380  
    1 --- makefile.unix.orig  2009-12-28 08:18:59.000000000 +0100
    2 +++ makefile.unix       2009-12-28 08:28:44.000000000 +0100
    3 @@ -100,7 +100,7 @@
    4  WHAT=UNRAR
    5  
    6  UNRAR_OBJ=filestr.o recvol.o rs.o scantree.o
    7 -LIB_OBJ=filestr.o scantree.o dll.o
    8 +LIB_OBJ=filestr.o recvol.o rs.o scantree.o dll.o
    9  
    10  OBJECTS=rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o filefn.o filcreat.o \
    11         archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \
    12 @@ -132,8 +132,8 @@
    13  
     1--- makefile.unix.orig  2012-05-15 00:31:03.000000000 -0500
     2+++ makefile.unix       2012-11-04 02:54:31.000000000 -0600
     3@@ -130,8 +130,8 @@
    144 lib:   WHAT=RARDLL
    15  lib:   $(OBJECTS) $(LIB_OBJ)
     5 lib:   CXXFLAGS+=$(LIBFLAGS)
     6 lib:   clean $(OBJECTS) $(LIB_OBJ)
    167-       @rm -f libunrar.so
    178-       $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
    189+       @rm -f libunrar.dylib
    19 +       $(LINK) -shared -o libunrar.dylib $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
     10+       $(LINK) -dynamiclib -o libunrar.dylib -install_name $(DESTDIR)/lib/libunrar.dylib $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
    2011 
    2112 install-unrar:
    22                         install unrar $(DESTDIR)/bin
    23 @@ -142,7 +142,7 @@
    24                         rm -f $(DESTDIR)/bin/unrar
    25  
    26  install-lib:
    27 -               install libunrar.so $(DESTDIR)/lib
    28 +               install libunrar.dylib $(DESTDIR)/lib
    29  
    30  uninstall-lib:
    31 -               rm -f $(DESTDIR)/lib/libunrar.so
    32 +               rm -f $(DESTDIR)/lib/libunrar.dylib
     13                        install -D unrar $(DESTDIR)/bin/unrar
  • trunk/dports/archivers/unrar/files/patch-makefile.unix.diff

    r99375 r99380  
    1 --- makefile.unix.orig  2009-12-28 08:18:59.000000000 +0100
    2 +++ makefile.unix       2009-12-28 08:28:44.000000000 +0100
    3 @@ -100,7 +100,7 @@
     1--- makefile.unix.orig  2012-05-15 00:31:03.000000000 -0500
     2+++ makefile.unix       2012-11-04 02:52:55.000000000 -0600
     3@@ -97,7 +97,7 @@
    44 WHAT=UNRAR
    55 
     
    1010 OBJECTS=rar.o strlist.o strfn.o pathfn.o savepos.o smallfn.o global.o file.o filefn.o filcreat.o \
    1111        archive.o arcread.o unicode.o system.o isnt.o crypt.o crc.o rawread.o encname.o \
    12 @@ -132,8 +132,8 @@
    13  
    14  lib:   WHAT=RARDLL
    15  lib:   $(OBJECTS) $(LIB_OBJ)
    16 -       @rm -f libunrar.so
    17 -       $(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
    18 +       @rm -f libunrar.dylib
    19 +       $(LINK) -shared -o libunrar.dylib $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
    20  
    21  install-unrar:
    22                         install unrar $(DESTDIR)/bin
    23 @@ -142,7 +142,7 @@
    24                         rm -f $(DESTDIR)/bin/unrar
    25  
    26  install-lib:
    27 -               install libunrar.so $(DESTDIR)/lib
    28 +               install libunrar.dylib $(DESTDIR)/lib
    29  
    30  uninstall-lib:
    31 -               rm -f $(DESTDIR)/lib/libunrar.so
    32 +               rm -f $(DESTDIR)/lib/libunrar.dylib
Note: See TracChangeset for help on using the changeset viewer.