Ticket #36885: subsurface.patch

File subsurface.patch, 6.8 KB (added by macports@…, 11 years ago)

Updated subsurface patch, sans hardcoded /opt/local

  • subsurface

    diff -urN subsurface.orig/Portfile subsurface/Portfile
    old new  
    55PortGroup               github 1.0
    66
    77# when updating subsurface, it's probably a good idea to update libdivecomputer, too
    8 github.setup            torvalds subsurface 1.2 v
     8github.setup            torvalds subsurface 3.0.2 v
    99epoch                   1
    1010categories              x11
    1111platforms               darwin
     
    1616long_description        ${description}
    1717
    1818homepage                http://subsurface.hohndel.org/
    19 checksums               rmd160  f6c3251dc762c6396b18662b680493f94558a503 \
    20                         sha256  aa0cf4cbbb8ecafd78f17ee224b4dfc52814216fded0c83a9c977e382c21116e
     19checksums               rmd160  d822139199ca659760aea50992eb7f0aebe6ab5d \
     20                        sha256  61747523d4286b339c3cf7c4a495a0f24244dff797bb6c680e248aa03d1ffec5
    2121
    2222patchfiles              Makefile.patch
    2323
     
    2727                        port:gtk2 \
    2828                        port:hicolor-icon-theme \
    2929                        port:gconf \
    30                         port:libdivecomputer
     30                        port:libdivecomputer \
     31                        port:gtk-osx-application \
     32                        port:osm-gps-map \
     33                        port:libsoup \
     34                        port:py27-pygtk
    3135
    3236# declare universal variant, so get_canonical_archflags works
    3337variant universal       {}
     
    3640
    3741build.args-append       CC=${configure.cc} \
    3842                        EXTRACFLAGS="${configure.cflags} [get_canonical_archflags]" \
    39                         LDFLAGS="${configure.ldflags} [get_canonical_archflags] -framework CoreFoundation" \
     43                        LDFLAGS="${configure.ldflags} [get_canonical_archflags]" \
    4044                        mpprefix="${prefix}" \
    4145                        mpappdir="${destroot}${applications_dir}" \
    42                         prefix="${destroot}${prefix}"
     46                        prefix="${destroot}${prefix}" \
     47                        VERSION_STRING=${version}
    4348
    4449destroot.args-append    CC=${configure.cc} \
    4550                        EXTRACFLAGS="${configure.cflags} [get_canonical_archflags]" \
    46                         LDFLAGS="${configure.ldflags} [get_canonical_archflags] -framework CoreFoundation" \
     51                        LDFLAGS="${configure.ldflags} [get_canonical_archflags]" \
    4752                        prefix="${destroot}${prefix}" \
    4853                        mpappdir="${destroot}${applications_dir}"
     54
    4955destroot.target         install-macosx
  • files/Makefile.patch

    diff -urN subsurface.orig/files/Makefile.patch subsurface/files/Makefile.patch
    old new  
    1 --- Makefile.orig       2011-12-08 21:20:05.000000000 +0100
    2 +++ Makefile    2012-01-19 22:38:38.000000000 +0100
    3 @@ -1,7 +1,6 @@
    4  VERSION=1.2
    5  
    6 -CC=gcc
    7 -CFLAGS=-Wall -Wno-pointer-sign -g
    8 +CFLAGS=-Wall -Wno-pointer-sign -g $(EXTRACFLAGS)
     1--- Makefile.orig       2013-02-20 21:06:34.000000000 +0100
     2+++ Makefile    2013-02-20 22:48:49.000000000 +0100
     3@@ -1,7 +1,7 @@
     4 VERSION=2.9
     5 
     6 CC=gcc
     7-CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE
     8+CFLAGS=-Wall -Wno-pointer-sign -g $(CLCFLAGS) -DGSEAL_ENABLE $(EXTRACFLAGS)
    99 INSTALL=install
    1010 PKGCONFIG=pkg-config
    1111 XML2CONFIG=xml2-config
    12 @@ -9,7 +8,7 @@
     12@@ -9,7 +9,7 @@
    1313 
    1414 # these locations seem to work for SuSE and Fedora
    1515 # prefix = $(HOME)
     
    1818 BINDIR = $(prefix)/bin
    1919 DATADIR = $(prefix)/share
    2020 DESKTOPDIR = $(DATADIR)/applications
    21 @@ -25,7 +24,7 @@
    22  MANFILES = $(NAME).1
    23  XSLTFILES = xslt/*.xslt
    24  
    25 -MACOSXINSTALL = /Applications/Subsurface.app
    26 +MACOSXINSTALL = ${mpappdir}/Subsurface.app
    27  MACOSXFILES = packaging/macosx
    28  
    29  # find libdivecomputer
    30 @@ -35,40 +34,9 @@
    31  # subdirectories of /usr/local and /usr and then we give up. You can
    32  # override by simply setting it here
    33  #
    34 -ifeq ($(CC), i686-w64-mingw32-gcc)
    35 -# ok, we are cross building for Windows
    36 -       LIBDIVECOMPUTERDIR = /usr/i686-w64-mingw32/sys-root/mingw/include/libdivecomputer
    37 -       LIBDIVECOMPUTERINCLUDES = `$(PKGCONFIG) --cflags libdivecomputer`
    38 -       LIBDIVECOMPUTERARCHIVE = `$(PKGCONFIG) --libs libdivecomputer`
    39 -       RESFILE = packaging/windows/subsurface.res
    40 -       LDFLAGS += -Wl,-subsystem,windows
    41 -else
    42 -
     21@@ -53,8 +53,8 @@
     22        LIBDIVECOMPUTERINCLUDES = $(shell $(PKGCONFIG) --cflags libdivecomputer)
     23        LIBDIVECOMPUTERARCHIVE = $(shell $(PKGCONFIG) --libs libdivecomputer)
     24 else
    4325-libdc-local := $(wildcard /usr/local/lib/libdivecomputer.a)
    4426-libdc-local64 := $(wildcard /usr/local/lib64/libdivecomputer.a)
    45 -libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
    46 -libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
    47 -
    48 -ifneq ($(strip $(libdc-local)),)
    49 -       LIBDIVECOMPUTERDIR = /usr/local
    50 -       LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
    51 -       LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
    52 -else ifneq ($(strip $(libdc-local64)),)
    53 -       LIBDIVECOMPUTERDIR = /usr/local
    54 -       LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
    55 -       LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
    56 -else ifneq ($(strip $(libdc-usr)),)
    57 -       LIBDIVECOMPUTERDIR = /usr
    58 -       LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
    59 -       LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
    60 -else ifneq ($(strip $(libdc-usr64)),)
    61 -       LIBDIVECOMPUTERDIR = /usr
    62 -       LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
    63 -       LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
    64 -else
    65 -$(error Cannot find libdivecomputer - please edit Makefile)
    66 -endif
    67 -endif
    68 +LIBDIVECOMPUTERDIR = ${mpprefix}
    69 +LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
    70 +LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
    71  
    72  # Libusb-1.0 is only required if libdivecomputer was built with it.
    73  # And libdivecomputer is only built with it if libusb-1.0 is
    74 @@ -116,6 +84,8 @@
    75         parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \
    76         gtk-gui.o statistics.o $(OSSUPPORT).o $(RESFILE)
    77  
    78 +all: $(NAME)
    79 +
    80  $(NAME): $(OBJS)
    81         $(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
    82  
     27+libdc-local := $(wildcard $(prefix)/lib/libdivecomputer.a)
     28+libdc-local64 := $(wildcard $prefix)/lib64/libdivecomputer.a)
     29 libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
     30 libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
     31 
     32@@ -122,7 +122,7 @@
     33 else ifeq ($(UNAME), darwin)
     34        OSSUPPORT = macos
     35        OSSUPPORT_CFLAGS = $(GTKCFLAGS)
     36-       MACOSXINSTALL = /Applications/Subsurface.app
     37+       MACOSXINSTALL = ${mpappdir}/Subsurface.app
     38        MACOSXFILES = packaging/macosx
     39        MACOSXSTAGING = $(MACOSXFILES)/Subsurface.app
     40        INFOPLIST = $(MACOSXFILES)/Info.plist