Ticket #45377: patch-lensfun-0.3.0-revised.diff

File patch-lensfun-0.3.0-revised.diff, 7.1 KB (added by dbevans (David B. Evans), 10 years ago)

Proposed patch revised by devans

  • Portfile

     
    22# $Id$
    33
    44PortSystem          1.0
    5 PortGroup           muniversal 1.0
     5PortGroup           cmake 1.0
    66
    77name                lensfun
    88epoch               1
    9 version             0.2.8
    10 revision            1
     9version             0.3.0
    1110categories          graphics
    1211platforms           darwin
    1312maintainers         devans openmaintainer
    14 license             GPL-3 LGPL-3
     13license             GPL-3 LGPL-3 CC-BY-SA
    1514
    1615description         Library for fixing lens geometry distortion
    1716
     
    2423master_sites        sourceforge:project/${name}/${version}
    2524use_bzip2           yes
    2625
    27 checksums           rmd160  527b4ca0e9ce40f514e7340548d0d0635bdc875e \
    28                     sha256  f88f97fbc78259a2b2edddef295caf50770901107c8469e54bb5e9699faa1a48
     26checksums           rmd160  dc39f4708b2632ed6795052d368f3ad847c6704f \
     27                    sha256  c2c3c03873cb549d49d42f118fcb0ffa95d1e45b9ff395e19facb63bf699bec1
    2928
    30 depends_build       port:pkgconfig bin:makedep:gccmakedep
     29depends_build-append \
     30                    port:pkgconfig
    3131
    32 depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2
     32depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
     33                    port:libpng
    3334
    34 # Ensure lensfun.pc is created
    35 patchfiles          patch-pkgconfig.diff
     35# installs python3 helper scripts lensfun-add-adapter lensfun-update-data
    3636
    37 # Set the correct library install_name and current_version
    38 patchfiles-append   patch-build-tibs-target-mac-mak.diff
    39 post-patch {
    40     reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/build/tibs/target/mac.mak
    41 }
     37depends_run         port:python34
    4238
    43 set cxx_stdlibflags {}
    44 if {[string match *clang* ${configure.cxx}]} {
    45     set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
     39pre-patch {
     40    copy ${worksrcpath}/docs/CMakeLists.txt ${worksrcpath}/docs/CMakeLists.txt.orig
    4641}
    4742
    48 configure.args      -v
    49 configure.env       LD="${configure.cxx} ${cxx_stdlibflags}"
     43patchfiles          patch-docs-CMakeLists.txt.diff
    5044
    51 platform darwin 8 {
    52     # lensfun requires make >= 3.81; Tiger comes with 3.80
    53     depends_build-append port:gmake
    54     # fix configure script check which is hardcoded to using "make"
    55     post-extract {
    56         xinstall -d ${workpath}/bin
    57         ln -s ${prefix}/bin/gmake ${workpath}/bin/make
    58     }
    59     configure.env PATH=${workpath}/bin:$env(PATH)
    60     # fix build and destroot
    61     build.cmd ${prefix}/bin/gmake
     45post-patch {
     46                    reinplace "s|^#!.*|#!${prefix}/bin/python3.4|" \
     47                         ${worksrcpath}/apps/lensfun-add-adapter \
     48                         ${worksrcpath}/apps/lensfun-update-data
    6249}
    6350
    64 if {[variant_isset universal]} {
    65     foreach arch ${configure.universal_archs} {
    66         set merger_host($arch) ""
    67     }
    68     set merger_configure_args(ppc64)  "--target=mac.powerpc64.G5 --vectorization=''"
    69     set merger_configure_args(ppc)    "--target=mac.powerpc.powerpc --vectorization=''"
    70     set merger_configure_args(i386)   "--target=mac.x86.i686"
    71     set merger_configure_args(x86_64) "--target=mac.x86_64.generic"
    72 } elseif {${build_arch} eq "ppc64"} {
    73     configure.args-append --target=mac.powerpc64.G5 --vectorization=''
    74 } elseif {${build_arch} eq "ppc"} {
    75     configure.args-append --target=mac.powerpc.powerpc --vectorization=''
    76 } elseif {${build_arch} eq "i386"} {
    77     configure.args-append --target=mac.x86.i686
    78 } elseif {${build_arch} eq "x86_64"} {
    79     configure.args-append --target=mac.x86_64.generic
     51variant doc description {Build API and man documentation using doxygen, rst2man} {
     52    depends_build-append \
     53                    port:doxygen \
     54                    port:py34-docutils
     55
     56    configure.args-append \
     57                    -DBUILD_DOC=ON
    8058}
    8159
    82 configure.universal_args-delete --disable-dependency-tracking
    83 
    84 build.args          V=1 GCC.LD="${configure.cxx} ${cxx_stdlibflags}"
    85 
    8660livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
  • files/patch-build-tibs-target-mac-mak.diff

     
    1 --- build/tibs/target/mac.mak.orig      2011-01-17 20:34:03.000000000 +1300
    2 +++ build/tibs/target/mac.mak   2011-01-17 20:35:12.000000000 +1300
    3 @@ -12,6 +12,6 @@
    4  _EX =
    5  
    6  # Flag to tell Darwin linker to set the library name:
    7 -GCC.LDFLAGS.SHARED = -dynamiclib -Wl,"-dylib_install_name,$1"
    8 +GCC.LDFLAGS.SHARED = -dynamiclib -Wl,"-install_name,$(CONF_LIBDIR)$1" -Wl,"-current_version,@VERSION@"
    9  # Set to non-empty if platform supports versioned shared libraries
    10  SO.VERSION = 1
  • files/patch-docs-CMakeLists.txt.diff

     
     1--- docs/CMakeLists.txt.orig    2014-09-30 10:37:34.000000000 -0700
     2+++ docs/CMakeLists.txt 2015-03-06 08:19:31.000000000 -0800
     3@@ -26,9 +26,9 @@
     4 ADD_CUSTOM_TARGET(man ALL)
     5 ADD_CUSTOM_COMMAND(
     6   TARGET man
     7-  COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/g-lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/g-lensfun-update-data.1
     8-  COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-update-data.1
     9-  COMMAND rst2man ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-add-adapter.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
     10+  COMMAND rst2man-3.4.py ${CMAKE_CURRENT_SOURCE_DIR}/man/g-lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/g-lensfun-update-data.1
     11+  COMMAND rst2man-3.4.py ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-update-data.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-update-data.1
     12+  COMMAND rst2man-3.4.py ${CMAKE_CURRENT_SOURCE_DIR}/man/lensfun-add-adapter.1.rst > ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
     13   WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
     14 )
     15 
     16@@ -36,5 +36,5 @@
     17     ${CMAKE_CURRENT_BINARY_DIR}/g-lensfun-update-data.1
     18     ${CMAKE_CURRENT_BINARY_DIR}/lensfun-update-data.1
     19     ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1
     20-    DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1
     21+    DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
     22 )
  • files/patch-pkgconfig.diff

     
    1 --- build/tibs/compiler/pkgconfig.mak.orig      2010-03-23 09:32:47.000000000 +1300
    2 +++ build/tibs/compiler/pkgconfig.mak   2011-01-16 13:37:03.000000000 +1300
    3 @@ -3,8 +3,9 @@
    4  ifdef CONF_LIBDIR
    5  # Try to guess here if target supports pkgconfig
    6  # - Any POSIX platform
    7 +# - Macintosh
    8  # - Cross-compiling on a POSIX target for WINDOWS (mingw32)
    9 -ifneq ($(findstring /posix/,/$(TARGET)/)$(findstring /posix-windows/,/$(HOST)-$(TARGET)/),)
    10 +ifneq ($(findstring /posix/,/$(TARGET)/)$(findstring /mac/,/$(TARGET)/)$(findstring /posix-windows/,/$(HOST)-$(TARGET)/),)
    11  
    12  XFNAME.PKGCONFIG = $(addprefix $$(OUT),$1)
    13  MKDEPS.PKGCONFIG = $1