[86078] users/cal/ports/x11

cal at macports.org cal at macports.org
Tue Oct 18 17:54:38 PDT 2011


Revision: 86078
          http://trac.macports.org/changeset/86078
Author:   cal at macports.org
Date:     2011-10-18 17:54:37 -0700 (Tue, 18 Oct 2011)
Log Message:
-----------
user port for x11/subsurface. This should be ready to go into dports along with libdivecomputer.

Added Paths:
-----------
    users/cal/ports/x11/subsurface/
    users/cal/ports/x11/subsurface/Portfile
    users/cal/ports/x11/subsurface/files/
    users/cal/ports/x11/subsurface/files/Makefile.patch

Added: users/cal/ports/x11/subsurface/Portfile
===================================================================
--- users/cal/ports/x11/subsurface/Portfile	                        (rev 0)
+++ users/cal/ports/x11/subsurface/Portfile	2011-10-19 00:54:37 UTC (rev 86078)
@@ -0,0 +1,43 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id $
+
+PortSystem              1.0
+
+name                    subsurface
+# when updating subsurface, it's probably a good idea to update libdivecomputer, too
+version                 2011101900
+categories              x11
+platforms               darwin
+license                 GPL-2
+maintainers             cal openmaintainer
+
+description             Subsurface is an open source dive log program written in C.
+long_description        ${description}
+
+homepage                http://subsurface.hohndel.org/
+fetch.type              git
+# this used to work with http when I first tried it, but somehow now returns 403
+git.url                 git://subsurface.hohndel.org/subsurface.git
+git.branch              2b3d39f6fc9814fb1190dd5b69396defe4cc85cf
+
+patchfiles              Makefile.patch
+
+depends_lib             path:lib/pkgconfig/glib-2.0.pc:glib2 \
+                        port:libxml2 \
+                        port:gtk2 \
+                        port:hicolor-icon-theme \
+                        port:gconf \
+                        port:libdivecomputer
+
+# declare universal variant, so get_canonical_archflags works
+variant universal       {}
+
+use_configure           no
+
+build.args-append       CC=${configure.compiler} \
+                        EXTRACFLAGS="${configure.cflags} [get_canonical_archflags]" \
+                        LDFLAGS="${configure.ldflags} [get_canonical_archflags]" \
+                        prefix="${destroot}${prefix}"
+
+destroot.args-append    prefix="${destroot}${prefix}"
+


Property changes on: users/cal/ports/x11/subsurface/Portfile
___________________________________________________________________
Added: svn:eol-style:native
   + 
Added: svn:keywords
   + Id

Added: users/cal/ports/x11/subsurface/files/Makefile.patch
===================================================================
--- users/cal/ports/x11/subsurface/files/Makefile.patch	                        (rev 0)
+++ users/cal/ports/x11/subsurface/files/Makefile.patch	2011-10-19 00:54:37 UTC (rev 86078)
@@ -0,0 +1,69 @@
+--- 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
+ 
+ CC=gcc
+-CFLAGS=-Wall -Wno-pointer-sign -g
++CFLAGS=-Wall -Wno-pointer-sign -g $(EXTRACFLAGS)
+ INSTALL=install
+ 
+ # these locations seem to work for SuSE and Fedora
+ # prefix = $(HOME)
+-prefix = $(DESTDIR)/usr
++#prefix = $(DESTDIR)/usr
+ BINDIR = $(prefix)/bin
+ DATADIR = $(prefix)/share
+ DESKTOPDIR = $(DATADIR)/applications
+@@ -20,35 +20,16 @@
+ DESKTOPFILE = $(NAME).desktop
+ MANFILES = $(NAME).1
+ 
+-# 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/*)
+-
+-ifneq ($(strip $(libdc-local)),)
+-	LIBDIVECOMPUTERDIR = /usr/local
+-	LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+-	LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/libdivecomputer.a
+-else ifneq ($(strip $(libdc-usr)),)
+-	LIBDIVECOMPUTERDIR = /usr
+-	LIBDIVECOMPUTERINCLUDES = $(LIBDIVECOMPUTERDIR)/include/libdivecomputer
+-	LIBDIVECOMPUTERARCHIVE = $(LIBDIVECOMPUTERDIR)/lib/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)
+ 
+ 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 @@
+ 	parse-xml.o save-xml.o libdivecomputer.o print.o uemis.o \
+ 	gtk-gui.o
+ 
++all: $(NAME)
++
+ $(NAME): $(OBJS)
+ 	$(CC) $(LDFLAGS) -o $(NAME) $(OBJS) $(LIBS)
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111018/6d2bae26/attachment.html>


More information about the macports-changes mailing list