Группа :: Система/Библиотеки
Пакет: liblcms
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: liblcms-1.09-alt-build.patch
diff -Naur lcms-1.09.orig/Makefile lcms-1.09/Makefile
--- lcms-1.09.orig/Makefile 1970-01-01 03:00:00 +0300
+++ lcms-1.09/Makefile 2002-09-09 14:48:54 +0400
@@ -0,0 +1,2 @@
+all install clean test::
+ for d in src samples testbed tifficc; do $(MAKE) -C $$d $@ || exit; done
diff -Naur lcms-1.09.orig/samples/Makefile lcms-1.09/samples/Makefile
--- lcms-1.09.orig/samples/Makefile 2002-06-14 19:07:01 +0400
+++ lcms-1.09/samples/Makefile 2002-09-09 14:51:15 +0400
@@ -1,6 +1,6 @@
SHELL = /bin/sh
-CFLAGS = -g -O4 -Wall
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
BASEDIR = $(DESTDIR)/usr
BINDIR = $(BASEDIR)/bin
@@ -8,10 +8,10 @@
all: icctrans wtpt
icctrans: icctrans.c xgetopt.c
- $(CC) $(CFLAGS) icctrans.c xgetopt.c ../src/liblcms.a -I../include -o icctrans -lm
+ $(CC) $(CFLAGS) icctrans.c xgetopt.c -o icctrans -lm -L../src -llcms
wtpt: wtpt.c
- $(CC) $(CFLAGS) wtpt.c ../src/liblcms.a -I../include -o wtpt -lm
+ $(CC) $(CFLAGS) wtpt.c -o wtpt -lm -L../src -llcms
install: icctrans
-cp icctrans $(BINDIR)
diff -Naur lcms-1.09.orig/src/makefile lcms-1.09/src/makefile
--- lcms-1.09.orig/src/makefile 2002-06-17 18:29:45 +0400
+++ lcms-1.09/src/makefile 2002-09-09 14:54:20 +0400
@@ -1,11 +1,12 @@
SHELL = /bin/sh
-CFLAGS = -g -O4 -I../include -fomit-frame-pointer -Wall
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
LDFLAGS = -lm
BASEDIR = $(DESTDIR)/usr
BINDIR = $(BASEDIR)/bin
LIBDIR = $(BASEDIR)/lib
-INCDIR = $(BASEDIR)/include
+INCDIR = $(BASEDIR)/include/lcms
+SONAME = 1
VERSION = 1.0.9
AR = ar -cru
RANLIB = ranlib
@@ -33,9 +34,9 @@
$(RANLIB) liblcms.a
liblcms.so.${VERSION}: $(OBJS)
- -$(CC) $(CFLAGS) $(LDFLAGS) -shared -o liblcms.so.${VERSION} $(OBJS)
- -ln -s liblcms.so.${VERSION} liblcms.so.1
- -ln -s liblcms.so.1 liblcms.so
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,liblcms.so.${SONAME} -o liblcms.so.${VERSION} $(OBJS)
+ ln -s liblcms.so.${VERSION} liblcms.so.${SONAME}
+ ln -s liblcms.so.${SONAME} liblcms.so
#
# Installation
@@ -43,9 +44,9 @@
install: liblcms.a liblcms.so.${VERSION}
mkdir -p $(BINDIR) $(LIBDIR) $(INCDIR)
- -cp -a liblcms.so* $(LIBDIR)
- cp -a liblcms.a $(LIBDIR)
- cp ../include/lcms.h ../include/icc34.h $(INCDIR)
+ cp -a liblcms.so* $(LIBDIR)
+ $(INSTALL) liblcms.a $(LIBDIR)
+ $(INSTALL) ../include/lcms.h ../include/icc34.h $(INCDIR)
#
# Test programs
@@ -61,4 +62,4 @@
#
clean:
- -rm $(OBJS) liblcms.a liblcms.so.${VERSION} liblcms.so.1 liblcms.so
+ -rm $(OBJS) liblcms.a liblcms.so.${VERSION} liblcms.so.${SONAME} liblcms.so
diff -Naur lcms-1.09.orig/testbed/Makefile lcms-1.09/testbed/Makefile
--- lcms-1.09.orig/testbed/Makefile 2002-06-14 19:07:46 +0400
+++ lcms-1.09/testbed/Makefile 2002-09-09 14:55:47 +0400
@@ -1,16 +1,16 @@
SHELL = /bin/sh
-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
testcms.o: testcms.c
testcms: testcms.o ../src/liblcms.a
- $(CC) $(CFLAGS) testcms.o ../src/liblcms.a -o $@ -lm
+ $(CC) $(CFLAGS) testcms.o -o $@ -lm -L../src -llcms
all: testcms test
test: testcms
- ./testcms
+ LD_LIBRARY_PATH=../src ./testcms
install:
# Nothing to install
diff -Naur lcms-1.09.orig/tifficc/Makefile lcms-1.09/tifficc/Makefile
--- lcms-1.09.orig/tifficc/Makefile 2002-06-14 19:49:53 +0400
+++ lcms-1.09/tifficc/Makefile 2002-09-09 14:56:42 +0400
@@ -1,6 +1,6 @@
SHELL = /bin/sh
-CFLAGS = -g -O4 -fomit-frame-pointer -Wall -I../include -I/usr/include -I/usr/local/include
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
BASEDIR = $(DESTDIR)/usr
BINDIR = $(BASEDIR)/bin
@@ -8,7 +8,7 @@
all: tifficc
tifficc: tifficc.o getopt.o
- $(CC) $(CFLAGS) tifficc.o getopt.o ../src/liblcms.a -o $@ -lm -ljpeg -ltiff -lz
+ $(CC) $(CFLAGS) tifficc.o getopt.o -o $@ -lm -ljpeg -ltiff -lz -L../src -llcms
tifficc.o: tifficc.c
getopt.o: getopt.c