[89136] users/cal/ports/x11/subsurface
cal at macports.org
cal at macports.org
Thu Jan 19 13:47:25 PST 2012
Revision: 89136
http://trac.macports.org/changeset/89136
Author: cal at macports.org
Date: 2012-01-19 13:47:25 -0800 (Thu, 19 Jan 2012)
Log Message:
-----------
subsurface: Fix build after update to 1.2
Modified Paths:
--------------
users/cal/ports/x11/subsurface/Portfile
users/cal/ports/x11/subsurface/files/Makefile.patch
Modified: users/cal/ports/x11/subsurface/Portfile
===================================================================
--- users/cal/ports/x11/subsurface/Portfile 2012-01-19 21:45:38 UTC (rev 89135)
+++ users/cal/ports/x11/subsurface/Portfile 2012-01-19 21:47:25 UTC (rev 89136)
@@ -18,6 +18,8 @@
github.setup torvalds subsurface 1.2 v
homepage http://subsurface.hohndel.org/
+checksums rmd160 f6c3251dc762c6396b18662b680493f94558a503 \
+ sha256 aa0cf4cbbb8ecafd78f17ee224b4dfc52814216fded0c83a9c977e382c21116e
patchfiles Makefile.patch
@@ -35,8 +37,15 @@
build.args-append CC=${configure.cc} \
EXTRACFLAGS="${configure.cflags} [get_canonical_archflags]" \
- LDFLAGS="${configure.ldflags} [get_canonical_archflags]" \
+ LDFLAGS="${configure.ldflags} [get_canonical_archflags] -framework CoreFoundation" \
+ mpprefix="${prefix}" \
+ mpappdir="${destroot}${applications_dir}" \
prefix="${destroot}${prefix}"
-destroot.args-append prefix="${destroot}${prefix}"
+destroot.args-append CC=${configure.cc} \
+ EXTRACFLAGS="${configure.cflags} [get_canonical_archflags]" \
+ LDFLAGS="${configure.ldflags} [get_canonical_archflags] -framework CoreFoundation" \
+ prefix="${destroot}${prefix}" \
+ mpappdir="${destroot}${applications_dir}"
+destroot.target install-macosx
Modified: users/cal/ports/x11/subsurface/files/Makefile.patch
===================================================================
--- users/cal/ports/x11/subsurface/files/Makefile.patch 2012-01-19 21:45:38 UTC (rev 89135)
+++ users/cal/ports/x11/subsurface/files/Makefile.patch 2012-01-19 21:47:25 UTC (rev 89136)
@@ -1,12 +1,15 @@
---- Makefile.orig 2011-10-19 02:37:52.000000000 +0200
-+++ Makefile 2011-10-19 02:38:25.000000000 +0200
-@@ -1,12 +1,12 @@
- VERSION=1.0
+--- Makefile.orig 2011-12-08 21:20:05.000000000 +0100
++++ Makefile 2012-01-19 22:38:38.000000000 +0100
+@@ -1,7 +1,6 @@
+ VERSION=1.2
- CC=gcc
+-CC=gcc
-CFLAGS=-Wall -Wno-pointer-sign -g
+CFLAGS=-Wall -Wno-pointer-sign -g $(EXTRACFLAGS)
INSTALL=install
+ PKGCONFIG=pkg-config
+ XML2CONFIG=xml2-config
+@@ -9,7 +8,7 @@
# these locations seem to work for SuSE and Fedora
# prefix = $(HOME)
@@ -15,52 +18,62 @@
BINDIR = $(prefix)/bin
DATADIR = $(prefix)/share
DESKTOPDIR = $(DATADIR)/applications
-@@ -20,35 +20,16 @@
- DESKTOPFILE = $(NAME).desktop
+@@ -25,7 +24,7 @@
MANFILES = $(NAME).1
+ XSLTFILES = xslt/*.xslt
--# find libdivecomputer; we don't trust pkg-config here given how young
--# libdivecomputer still is - so we check /usr/local and /usr and then we
--# give up. You can override by simply setting it here
--#
--libdc-local := $(wildcard /usr/local/include/libdivecomputer/*)
--libdc-usr := $(wildcard /usr/include/libdivecomputer/*)
+-MACOSXINSTALL = /Applications/Subsurface.app
++MACOSXINSTALL = ${mpappdir}/Subsurface.app
+ MACOSXFILES = packaging/macosx
+
+ # find libdivecomputer
+@@ -35,40 +34,9 @@
+ # subdirectories of /usr/local and /usr and then we give up. You can
+ # override by simply setting it here
+ #
+-ifeq ($(CC), i686-w64-mingw32-gcc)
+-# ok, we are cross building for Windows
+- LIBDIVECOMPUTERDIR = /usr/i686-w64-mingw32/sys-root/mingw/include/libdivecomputer
+- LIBDIVECOMPUTERINCLUDES = `$(PKGCONFIG) --cflags libdivecomputer`
+- LIBDIVECOMPUTERARCHIVE = `$(PKGCONFIG) --libs libdivecomputer`
+- RESFILE = packaging/windows/subsurface.res
+- LDFLAGS += -Wl,-subsystem,windows
+-else
-
+-libdc-local := $(wildcard /usr/local/lib/libdivecomputer.a)
+-libdc-local64 := $(wildcard /usr/local/lib64/libdivecomputer.a)
+-libdc-usr := $(wildcard /usr/lib/libdivecomputer.a)
+-libdc-usr64 := $(wildcard /usr/lib64/libdivecomputer.a)
+-
-ifneq ($(strip $(libdc-local)),)
- LIBDIVECOMPUTERDIR = /usr/local
-- LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+- LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
- LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+-else ifneq ($(strip $(libdc-local64)),)
+- LIBDIVECOMPUTERDIR = /usr/local
+- LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+- LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
-else ifneq ($(strip $(libdc-usr)),)
- LIBDIVECOMPUTERDIR = /usr
-- LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+- LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
- LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+-else ifneq ($(strip $(libdc-usr64)),)
+- LIBDIVECOMPUTERDIR = /usr
+- LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+- LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib64/libdivecomputer.a
-else
-$(error Cannot find libdivecomputer - please edit Makefile)
-endif
--
--# Libusb-1.0 is only required if libdivecomputer was built with it.
--# And libdivecomputer is only built with it if libusb-1.0 is
--# installed. So get libusb if it exists, but don't complain
--# about it if it doesn't.
--LIBUSB = $(shell pkg-config --libs libusb-1.0 2> /dev/null)
-+# I trust pkg-config with libdivecomputer, and I also don't want to statically
-+# link libdivecomputer, because static linking is somewhat... cumbersome... on a
-+# Mac.
-+# Using libdivecomputer.dylib also means we don't need to link against libusb
-+# manually.
-+LIBDIVECOMPUTER = $(shell pkg-config --libs libdivecomputer)
-+LIBDIVECOMPUTERCFLAGS = $(shell pkg-config --cflags libdivecomputer)
+-endif
++LIBDIVECOMPUTERDIR = ${mpprefix}
++LIBDIVECOMPUTERINCLUDES = -I$(LIBDIVECOMPUTERDIR)/include/libdivecomputer
++LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
- LIBXML2 = $(shell xml2-config --libs)
- LIBGTK = $(shell pkg-config --libs gtk+-2.0 glib-2.0 gconf-2.0)
--LIBDIVECOMPUTERCFLAGS = -I$(LIBDIVECOMPUTERINCLUDES)
--LIBDIVECOMPUTER = $(LIBDIVECOMPUTERARCHIVE) $(LIBUSB)
-
- LIBS = $(LIBXML2) $(LIBGTK) $(LIBDIVECOMPUTER) -lpthread
-
-@@ -56,6 +37,8 @@
+ # Libusb-1.0 is only required if libdivecomputer was built with it.
+ # And libdivecomputer is only built with it if libusb-1.0 is
+@@ -116,6 +84,8 @@
parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \
- gtk-gui.o
+ gtk-gui.o statistics.o $(OSSUPPORT).o $(RESFILE)
+all: $(NAME)
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120119/e35f604d/attachment-0001.html>
More information about the macports-changes
mailing list