[csw-devel] SF.net SVN: gar:[10783] csw/mgar/pkg/bzip2/trunk

gmarler at users.sourceforge.net gmarler at users.sourceforge.net
Fri Aug 20 05:58:58 CEST 2010


Revision: 10783
          http://gar.svn.sourceforge.net/gar/?rev=10783&view=rev
Author:   gmarler
Date:     2010-08-20 03:58:57 +0000 (Fri, 20 Aug 2010)

Log Message:
-----------
Now builds 32 and 64 bit binaries and shared libraries
tests run successfully

Modified Paths:
--------------
    csw/mgar/pkg/bzip2/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/bzip2/trunk/checksums
    csw/mgar/pkg/bzip2/trunk/files/
    csw/mgar/pkg/bzip2/trunk/files/0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch
    csw/mgar/pkg/bzip2/trunk/files/0002-test-should-depend-on-bzip2.patch

Modified: csw/mgar/pkg/bzip2/trunk/Makefile
===================================================================
--- csw/mgar/pkg/bzip2/trunk/Makefile	2010-08-19 20:15:57 UTC (rev 10782)
+++ csw/mgar/pkg/bzip2/trunk/Makefile	2010-08-20 03:58:57 UTC (rev 10783)
@@ -16,25 +16,45 @@
 times faster at decompression.
 endef
 
-MASTER_SITES = http://www.bzip.org/$(GARVERSION)
-DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
+MASTER_SITES = http://www.bzip.org/$(GARVERSION)/
+DISTFILES    = $(GARNAME)-$(GARVERSION).tar.gz
+PATCHFILES   = 0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch
+PATCHFILES  += 0002-test-should-depend-on-bzip2.patch
 
 # We define upstream file regex so we can be notifed of new upstream
 # software release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
-sysconfdir = /etc/opt/csw
-localstatedir = /var/opt/csw
-CONFIGURE_ARGS = $(DIRPATHS)
-# TODO: Check if these might be needed
-#  CONFIGURE_ARGS += --with-libintl-prefix=/opt/csw
-#  CONFIGURE_ARGS += --with-libiconv-prefix=/opt/csw
+PACKAGES    = CSWbzip2
+CATALOGNAME = bzip2
 
-ifneq ($(GARVERSION), 8.4)
-TEST_TARGET = check
-else
-TEST_SCRIPTS =
-endif
+BUILD64     = 1
+GARCOMPILER = SOS12
 
+CFLAGS  += -KPIC -D_FILE_OFFSET_BITS=64 -fast $(SOS12_CC_FLAGS)
+LDFLAGS += $(SOS12_LD_FLAGS) $(RUNPATH_LINKER_FLAGS)
+
+BUILD_ARGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+
+BUILD_SCRIPTS     = custom
+TEST_SCRIPTS      = custom
+CONFIGURE_SCRIPTS =
+INSTALL_SCRIPTS   = custom
+
+LD_LIBRARY_PATH=.
+export LD_LIBRARY_PATH
+EXTRA_TEST_EXPORTS = LD_LIBRARY_PATH
+
 include gar/category.mk
 
+build-custom:
+	$(MAKE) -C $(WORKSRC) -f Makefile-libbz2_so $(BUILD_ARGS)
+	@$(MAKECOOKIE)
+
+test-custom:
+	$(MAKE) -C $(WORKSRC) -f Makefile-libbz2_so test
+	@$(MAKECOOKIE)
+
+install-custom:
+	@echo " => Installing $(CATALOGNAME)"
+	@$(MAKECOOKIE)

Added: csw/mgar/pkg/bzip2/trunk/checksums
===================================================================
--- csw/mgar/pkg/bzip2/trunk/checksums	                        (rev 0)
+++ csw/mgar/pkg/bzip2/trunk/checksums	2010-08-20 03:58:57 UTC (rev 10783)
@@ -0,0 +1,3 @@
+e75c460d8ff1a91bd295277824b4f080  0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch
+989947c7661176ad26174bf5b65f4ee0  0002-test-should-depend-on-bzip2.patch
+3c15a0c8d1d3ee1c46a1634d00617b1a  bzip2-1.0.5.tar.gz

Added: csw/mgar/pkg/bzip2/trunk/files/0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch
===================================================================
--- csw/mgar/pkg/bzip2/trunk/files/0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch	                        (rev 0)
+++ csw/mgar/pkg/bzip2/trunk/files/0001-CFLAGS-LDFLAGS-for-SOS12-shared-lib.patch	2010-08-20 03:58:57 UTC (rev 10783)
@@ -0,0 +1,77 @@
+From 35021e8f149f06a789417a41bbc784182910ec18 Mon Sep 17 00:00:00 2001
+From: Gordon Marler <gmarler at opencsw.org>
+Date: Fri, 20 Aug 2010 05:19:08 +0200
+Subject: [PATCH] CFLAGS LDFLAGS for SOS12 shared lib
+
+---
+ Makefile-libbz2_so |   34 ++++++++++++++++++++++++++--------
+ 1 files changed, 26 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
+index 9a13c77..23c1a12 100644
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -1,6 +1,6 @@
+ 
+ # This Makefile builds a shared version of the library, 
+-# libbz2.so.1.0.4, with soname libbz2.so.1.0,
++# libbz2.so.1.0.5, with soname libbz2.so.1.0,
+ # at least on x86-Linux (RedHat 7.2), 
+ # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).  
+ # Please see the README file for some important info 
+@@ -22,9 +22,8 @@
+ 
+ 
+ SHELL=/bin/sh
+-CC=gcc
+-BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
++
++
+ 
+ OBJS= blocksort.o  \
+       huffman.o    \
+@@ -35,13 +34,13 @@ OBJS= blocksort.o  \
+       bzlib.o
+ 
+ all: $(OBJS)
+-	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
+-	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4
++	$(CC) -G $(CFLAGS) $(LDFLAGS) -o libbz2.so.1.0.5 $(OBJS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.c libbz2.so.1.0.5
+ 	rm -f libbz2.so.1.0
+-	ln -s libbz2.so.1.0.4 libbz2.so.1.0
++	ln -s libbz2.so.1.0.5 libbz2.so.1.0
+ 
+ clean: 
+-	rm -f $(OBJS) bzip2.o libbz2.so.1.0.4 libbz2.so.1.0 bzip2-shared
++	rm -f $(OBJS) bzip2.o libbz2.so.1.0.5 libbz2.so.1.0 bzip2
+ 
+ blocksort.o: blocksort.c
+ 	$(CC) $(CFLAGS) -c blocksort.c
+@@ -57,3 +56,22 @@ decompress.o: decompress.c
+ 	$(CC) $(CFLAGS) -c decompress.c
+ bzlib.o: bzlib.c
+ 	$(CC) $(CFLAGS) -c bzlib.c
++
++check:  test
++
++test: all
++	@cat words1
++	./bzip2 -1 < sample1.ref > sample1.rb2
++	./bzip2 -2  < sample2.ref > sample2.rb2
++	./bzip2 -3  < sample3.ref > sample3.rb2
++	./bzip2 -d  < sample1.bz2 > sample1.tst
++	./bzip2 -d  < sample2.bz2 > sample2.tst
++	./bzip2 -ds < sample3.bz2 > sample3.tst
++	cmp sample1.bz2 sample1.rb2
++	cmp sample2.bz2 sample2.rb2
++	cmp sample3.bz2 sample3.rb2
++	cmp sample1.tst sample1.ref
++	cmp sample2.tst sample2.ref
++	cmp sample3.tst sample3.ref
++	@cat words3
++
+-- 
+1.7.1
+

Added: csw/mgar/pkg/bzip2/trunk/files/0002-test-should-depend-on-bzip2.patch
===================================================================
--- csw/mgar/pkg/bzip2/trunk/files/0002-test-should-depend-on-bzip2.patch	                        (rev 0)
+++ csw/mgar/pkg/bzip2/trunk/files/0002-test-should-depend-on-bzip2.patch	2010-08-20 03:58:57 UTC (rev 10783)
@@ -0,0 +1,25 @@
+From 9ee98dbae36b812549127094a4140f1278d67ecf Mon Sep 17 00:00:00 2001
+From: Gordon Marler <gmarler at opencsw.org>
+Date: Fri, 20 Aug 2010 05:47:48 +0200
+Subject: [PATCH] test should depend on bzip2
+
+---
+ Makefile-libbz2_so |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
+index 1494abd..b980404 100644
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -59,7 +59,7 @@ bzlib.o: bzlib.c
+ 
+ check:  test
+ 
+-test: all
++test: bzip2
+ 	@cat words1
+ 	./bzip2 -1 < sample1.ref > sample1.rb2
+ 	./bzip2 -2  < sample2.ref > sample2.rb2
+-- 
+1.7.1
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list