clibpdf stable port information

Package: clibpdf
Version: 2.0.2r1
Revision: 2
Source: http://www.fastio.com/clibpdf202r1.tar.gz
Source-MD5: 840d78e187ab46fc5700caba9fbb33e5
SourceDirectory: ClibPDF/source/
Depends: %N1-shlibs (= %v-%r)
BuildDepends: fink (>= 0.24.12)
BuildDependsOnly: true
PatchFile: %n.patch
PatchFile-MD5: 08427ec87d047c4ac00b172363c494db
PatchScript: <<
sed 's|@FINKPREFIX@|%p|g' < %{PatchFile} | patch -p2

mv Makefile.MacOSX Makefile
<<
CompileScript: <<
make
<<
InstallScript: <<
make install DESTDIR=%d
<<
DocFiles: ../LICENSE.pdf ../LICENSEP.pdf ../doc/ClibPDF-FAQ.txt
SplitOff: <<
Package: %N1-shlibs
Files: <<
lib/libcpdf.*.dylib
<<
Shlibs: <<
%p/lib/libcpdf.1.dylib 1.0.0 %n (>= 2.0.2r1-2)
<<
DocFiles: ../LICENSE.pdf ../LICENSEP.pdf ../doc/ClibPDF-FAQ.txt
<<
###
Description: ANSI C Library for Direct PDF Generation
DescDetail: <<
ClibPDF is a library of ANSI C functions, distributed as source code,
for creating PDF files directly via C language programs without relying
on any Adobe Acrobat(R) tools and related products. It is free for
private, non-profit use, but a commercial license is required for
for-profit applications (Please see FastIO ClibPDF License for details
or a Digest Version -- License Summary in Japanese). The library is
suitable for creating fast dynamic PDF Web pages in response to user
input and from dynamic data sources, and also for implementing
publication-quality graph plotting, report or form generation. Since
there is minimal platform-specific code, it is ideal as cross-platform
graphing solutions with minimal developement efforts. Generated PDF
files may be viewed and printed by auto-launching Adobe Acrobat(R)
Reader or any other PDF viewer available free for many platforms. Note
that ClibPDF is for PDF file creation only. It has no support for
reading or modifying existing PDF files.
<<
License: Restrictive/Distributable
Maintainer: Dustin Sias
Homepage: http://www.fastio.com/

clibpdf stable port .patch

diff -ruN ClibPDF.orig/source/Makefile.MacOSX ClibPDF/source/Makefile.MacOSX
--- ClibPDF.orig/source/Makefile.MacOSX Sun Jan 2 11:36:43 2005
+++ ClibPDF/source/Makefile.MacOSX Sun Jan 2 13:18:16 2005
@@ -1,8 +1,10 @@
# Makefile for ClibPDF library - NEXTSTEP 3.x and OPENSTEP 4.2
# make lib; make install OR make shlib; make shinstall

-LIB_FILE=libcpdfm.a
-SHLIB_FILE=libcpdfm.sl
+LIB_FILE=libcpdf.a
+SHLIB_FILE=libcpdf.1.dylib
+SHLIB_FILE_VER=libcpdf.1.0.0.dylib
+SHLIB_LINK=libcpdf.dylib
#LIB_FILE=libcpdfpm.a
#SHLIB_FILE=libcpdfpm.sl

@@ -10,27 +12,25 @@
ROOTTEST=testpdf


-CC=cc
-#CC=gcc
+#CC=cc
+CC=gcc

#CFLAGS= -O
-CFLAGS=-Wall -g -DMacOSX
-#CFLAGS=-Wall -g -DMacOSX -DUSE_LIBTIFF
+CFLAGS=-Wall -g -fno-common -DMacOSX
+#CFLAGS=-Wall -g -fno-common -DMacOSX -DUSE_LIBTIFF

#For GCC, if you want to pack structure
#PACK=-fpack-struct
PACK=

-INCLUDE_DIR=/usr/local/include
-LIB_DIR=/usr/local/lib
-BINDIR=/local/ClibPDF
-
+INCLUDE_DIR=@FINKPREFIX@/include
+LIB_DIR=@FINKPREFIX@/lib

#LD_FLAGS=-s
#LD_FLAGS=-s -object
LD_FLAGS=

-#LIBS=-ltiff
+#LIBS=-L@FINKPREFIX@/lib -ltiff
LIBS=

# NEXTSTEP/OPENSTEP multiple architecture compile flags
@@ -55,6 +55,7 @@
# $(CC) $(LD_FLAGS) $(ARCHS) -o $(ROOT) $(ROOT).o $(OBJS) -L$(LIB_DIR) $(LIBS)


+all: lib shlib

test: $(ROOTTEST)

@@ -69,26 +70,31 @@

$(LIB_FILE): $(OBJS) $(POBJS) $(ZOBJS) Makefile
rm -f $(LIB_FILE)
- ar r $@ $(OBJS) $(POBJS) $(ZOBJS)
+ ar cru $@ $(OBJS) $(POBJS) $(ZOBJS)
ranlib -s $@

$(SHLIB_FILE): $(OBJS) $(POBJS) $(ZOBJS) Makefile
- rm -f $(SHLIB_FILE)
- ld -b -o $(SHLIB_FILE) $(OBJS) $(POBJS) $(ZOBJS)
+ rm -f $(SHLIB_FILE) $(SHLIB_FILE_VER) $(SHLIB_LINK)
+ $(CC) -dynamiclib -install_name $(LIB_DIR)/$(SHLIB_FILE) \
+ -compatibility_version 1.0.0 -current_version 1.0.0 \
+ -o $(SHLIB_FILE_VER) $(OBJS) $(POBJS) $(ZOBJS) $(LIBS)


-install: lib
-# mkdir -p $(LIB_DIR)
-# mkdir -p $(INCLUDE_DIR)
- cp $(LIB_FILE) $(LIB_DIR)
- ranlib -s $(LIB_DIR)/$(LIB_FILE)
- cp cpdflib.h $(INCLUDE_DIR)
+install: lib shinstall
+ mkdir -p $(DESTDIR)$(LIB_DIR)
+ mkdir -p $(DESTDIR)$(INCLUDE_DIR)
+ install -c -m 644 $(LIB_FILE) $(DESTDIR)$(LIB_DIR)
+ ranlib -s $(DESTDIR)$(LIB_DIR)/$(LIB_FILE)
+ install -c -m 644 cpdflib.h $(DESTDIR)$(INCLUDE_DIR)

shinstall: shlib
- mkdir -p $(BINDIR)/lib
- mkdir -p $(BINDIR)/include
- cp $(SHLIB_FILE) $(BINDIR)/lib
- cp cpdflib.h $(BINDIR)/include
+ mkdir -p $(DESTDIR)$(LIB_DIR)
+ mkdir -p $(DESTDIR)$(INCLUDE_DIR)
+ rm -f $(DESTDIR)$(LIB_DIR)/$(SHLIB_FILE) $(DESTDIR)$(LIB_DIR)/$(SHLIB_FILE_VER) $(DESTDIR)$(LIB_DIR)/$(SHLIB_LINK)
+ install -c -m 644 $(SHLIB_FILE_VER) $(DESTDIR)$(LIB_DIR)
+ (cd $(DESTDIR)$(LIB_DIR) && rm -f $(SHLIB_FILE) && ln -s $(LIB_DIR)/$(SHLIB_FILE_VER) $(SHLIB_FILE))
+ (cd $(DESTDIR)$(LIB_DIR) && rm -f $(SHLIB_LINK) && ln -s $(LIB_DIR)/$(SHLIB_FILE_VER) $(SHLIB_LINK))
+ install -c -m 644 cpdflib.h $(DESTDIR)$(INCLUDE_DIR)

# object files

clibpdf _unstable_ port .patch