[24345] trunk/dports/devel/libsdl_gfx

source_changes at macosforge.org source_changes at macosforge.org
Sun Apr 22 11:08:17 PDT 2007


Revision: 24345
          http://trac.macosforge.org/projects/macports/changeset/24345
Author:   mww at macports.org
Date:     2007-04-22 11:08:16 -0700 (Sun, 22 Apr 2007)

Log Message:
-----------
version 2.0.16, take maintainership, add livecheck, add dylib

Modified Paths:
--------------
    trunk/dports/devel/libsdl_gfx/Portfile

Added Paths:
-----------
    trunk/dports/devel/libsdl_gfx/files/
    trunk/dports/devel/libsdl_gfx/files/create-dylib.sh

Modified: trunk/dports/devel/libsdl_gfx/Portfile
===================================================================
--- trunk/dports/devel/libsdl_gfx/Portfile	2007-04-22 16:44:13 UTC (rev 24344)
+++ trunk/dports/devel/libsdl_gfx/Portfile	2007-04-22 18:08:16 UTC (rev 24345)
@@ -3,11 +3,10 @@
 PortSystem 1.0
 
 name			libsdl_gfx
-version			2.0.13
-revision		2
+version			2.0.16
 categories		devel graphics
 platforms		macosx
-maintainers		nomaintainer at macports.org
+maintainers		mww at macports.org
 description		graphics primitives SDL extension
 long_description	The SDL_gfx library evolved out of the \
 				SDL_gfxPrimitives code which provided basic drawing \
@@ -23,34 +22,31 @@
 homepage		http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/
 master_sites	${homepage}
 distname		SDL_gfx-${version}
-checksums		${distname}${extract.suffix} md5 b1ce778232db0b1979695f0a5a945a13
+checksums		${distname}${extract.suffix} sha1 c0277d25daf4b680876ef04a893f64e90d9ce03d
 
-depends_lib		port:libsdl
+depends_lib		port:libsdl port:libiconv
 
 configure.args	--disable-mmx \
 				--disable-sdltest
 
+post-build {
+	# create dylib
+	system "cd ${worksrcpath} && \
+		LDFLAGS=\"-L${prefix}/lib -lSDL\" \
+		/bin/sh ${filespath}/create-dylib.sh .libs/libSDL_gfx.a 1.0.0 ${prefix}/lib"
+}
+
 post-destroot	{
+	xinstall -m 755 -W ${worksrcpath} libSDL_gfx.1.0.0.dylib libSDL_gfx.dylib \
+		${destroot}${prefix}/lib
 	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
 	xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog INSTALL \
 		LICENSE NEWS README ${destroot}${prefix}/share/doc/${name}
 }
 
-platform darwin {
-	master_sites-append	opendarwin:lt
-	distfiles-append	ltconfig13:lt ltmain13:lt
-	checksums-append	ltconfig13 md5 ea53f42a550c9f9e653758a8ed91574e \
-						ltmain13 md5 e094ae92724c4015dbab97de151c2525
-	extract.only		${distname}${extract.suffix}
-
-	post-patch {
-		xinstall -m 0644 ${distpath}/ltconfig13 ${worksrcpath}/ltconfig
-		xinstall -m 0644 ${distpath}/ltmain13 ${worksrcpath}/ltmain.sh
-		reinplace "s|-version-info|-no-undefined -release \$(LT_RELEASE) &|" \
-			${worksrcpath}/Makefile.in
-	}
-}
-
 platform darwin 6 {
 	depends_lib-append	lib:libdl:dlcompat
 }
+
+livecheck.check	freshmeat
+livecheck.name	sdl_gfx

Added: trunk/dports/devel/libsdl_gfx/files/create-dylib.sh
===================================================================
--- trunk/dports/devel/libsdl_gfx/files/create-dylib.sh	                        (rev 0)
+++ trunk/dports/devel/libsdl_gfx/files/create-dylib.sh	2007-04-22 18:08:16 UTC (rev 24345)
@@ -0,0 +1,81 @@
+#!/bin/bash
+#
+# Copyright (c) 2005 - 2007 Markus W. Weissmann <mww at macports.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of OpenDarwin nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+if [ $# -ne 3 ]; then
+	echo "Usage: $0 lib.a version libdir"
+	exit 1
+fi
+
+tmpdir="create-dylib.${$}"
+
+liba=${1}
+version=${2}
+libdir=${3}
+if [ -z ${CC} ]; then
+	CC=gcc
+fi
+if [ -z ${AR} ]; then
+	AR=ar
+fi
+
+lib=$(echo $liba | sed 's|^.*/||g' | sed 's|\.a$||g')
+
+if ! mkdir ${tmpdir}; then
+	echo "Error creating tmpdir"
+	exit 2
+fi
+
+if [ ! -d ${tmpdir} ]; then
+	echo "error accessing tmpdir"
+	exit 3
+fi
+
+cd ${tmpdir}
+
+if ! ${AR} -x ../${1}; then
+	echo "Error extracting archive"
+	exit 4
+fi
+
+echo ${CC} ${CFLAGS} -fno-common -dynamiclib -o ../${lib}.${version}.dylib -current_version "${version}" -install_name "${libdir}/${lib}.${version}.dylib" *.o ${LDFLAGS}
+if ! ${CC} ${CFLAGS} -fno-common -dynamiclib -o ../${lib}.${version}.dylib -current_version "${version}" -install_name "${libdir}/${lib}.${version}.dylib" *.o ${LDFLAGS}; then
+	echo "Error creating dylib"
+	exit 5
+fi
+
+cd ..
+
+if ! rm -r ${tmpdir}; then
+	echo "Error removing tmpdir"
+	exit 6
+fi
+
+ln -s ${lib}.${version}.dylib ${lib}.dylib
+

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070422/10d0eefd/attachment.html


More information about the macports-changes mailing list