- Rebased/fixed patches:
* patch-libSNL-ptrList_h ->
0001-Fix-incorrect-item-removal-in-ptrList.patch
* patch-libSNL-build ->
0002-Fix-shared-library-build.patch
* libSNL-0.2-no-return-in-non-void-fix.patch ->
0003-Hide-missing-implementation-of-snlSurface-guessProjL.patch
* 0001-Do-not-enforce-namespace-std-in-all-headers.patch ->
0004-Do-not-enforce-namespace-std-in-all-headers.patch
- Add
* 0005-Remove-dangerous-ptrList-assignment-operator.patch
- Cleanup spec file
- Run test
- Fix build of packages dependent on libSNL (e.g. cgx), add
0001-Do-not-enforce-namespace-std-in-all-headers.patch
OBS-URL: https://build.opensuse.org/request/show/1224635
OBS-URL: https://build.opensuse.org/package/show/science/libSNL?expand=0&rev=3
60 lines
1.8 KiB
Diff
60 lines
1.8 KiB
Diff
From e4ae44ab6e151f50696946fd0d88e18400cc7263 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
Date: Sun, 17 Nov 2024 07:53:17 +0100
|
|
Subject: [PATCH 2/5] Fix shared library build
|
|
|
|
---
|
|
trunk/src/makefile | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/trunk/src/makefile b/trunk/src/makefile
|
|
index 12161e6..b31ec92 100644
|
|
--- a/trunk/src/makefile
|
|
+++ b/trunk/src/makefile
|
|
@@ -15,19 +15,19 @@ objFiles := snlCircularOffsetCurve.o \
|
|
|
|
libName = libSNL.so.0.2
|
|
|
|
-export cflags = -Wall -fPIC -g
|
|
-export cname = g++
|
|
+# rule for compiling c files for use with the dynamic library
|
|
+%.o: %.cpp
|
|
+ $(PURIFY) $(CXX) -c $(CFLAGS) $< -fPIC -DPIC -o $@
|
|
|
|
-CXXFLAGS := $(cflags)
|
|
-CFLAGS := $(cflags)
|
|
|
|
-libSNL: $(objFiles)
|
|
+$(libName): $(objFiles)
|
|
@ echo
|
|
@ echo "*** Building Shared Library ***"
|
|
@ echo
|
|
- $(cname) $(cflags) -shared -o $(libName) $(objFiles)
|
|
+ g++ -shared $? -Wl,-soname,libSNL.so.0.2 -o libSNL.so.0.2 -lm
|
|
+ ln -s libSNL.so.0.2 libSNL.so
|
|
|
|
-include make.dep
|
|
+-include make.dep
|
|
|
|
PHONY : dep
|
|
dep: make.dep
|
|
@@ -36,7 +36,7 @@ make.dep : $(objFiles:.o=.h) $(extraIncl)
|
|
@ echo
|
|
@ echo "*** Building Dependencies ***"
|
|
@ echo
|
|
- $(cname) -MM $(objFiles:.o=.cpp) > make.dep
|
|
+ $(CXX) -MM $(objFiles:.o=.cpp) > make.dep
|
|
@ echo
|
|
@ echo "*** Dependencies Built Okay ***"
|
|
@ echo
|
|
@@ -46,5 +46,5 @@ clean:
|
|
rm $(objFiles) make.dep $(libName) snlTest
|
|
|
|
test: snlTest.cpp
|
|
- $(cname) $(cflags) snlTest.cpp -o snlTest $(objFiles)
|
|
+ $(PURIFY) $(CXX) snlTest.cpp -o snlTest $(objFiles)
|
|
|
|
--
|
|
2.47.0
|
|
|