[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian packages for Chipmunk



Hi Scott,

My name is Miriam, I'm member of the Debian Games Team, and I'm
currently packaging Chipmunk for Debian. For doing so, I had to patch
a couple of files from the cmake building system, in order to add -lm
to the compilation, and to provide a proper SONAME, instead of just
having a different version number for the libraries regardless of
possible ABI changes.

I'm attaching my patches to this mail, in case you might be
interested, and I also wanted to ask you if you plan to have a SONAME
assigned by you instead of a different one for every possible Linux
distribution. If you need/want any help, please, just ask :)

Greetings, and thanks for your work,
Miry
--- Chipmunk-5.3.4.orig/src/CMakeLists.txt
+++ Chipmunk-5.3.4/src/CMakeLists.txt
@@ -4,6 +4,12 @@
 
 include_directories(${chipmunk_SOURCE_DIR}/include/chipmunk)
 
+if(UNIX)
+   set(MATH_LIB -lm)
+else(UNIX)
+   set(MATH_LIB)
+endif(UNIX)
+
 if(BUILD_SHARED)
   add_library(chipmunk SHARED
     ${chipmunk_source_files}
@@ -13,6 +19,8 @@
   install(TARGETS chipmunk RUNTIME DESTINATION lib LIBRARY DESTINATION lib)
 endif(BUILD_SHARED)
 
+target_link_libraries(chipmunk ${MATH_LIB})
+
 if(BUILD_STATIC)
   add_library(chipmunk_static STATIC
     ${chipmunk_source_files}
--- Chipmunk-5.3.4.orig/Demo/CMakeLists.txt
+++ Chipmunk-5.3.4/Demo/CMakeLists.txt
@@ -1,6 +1,12 @@
 find_package(OpenGL REQUIRED)
 find_package(GLUT REQUIRED)
 
+if(UNIX)
+  set(MATH_LIB -lm)
+else(UNIX)
+  set(MATH_LIB)
+endif(UNIX)
+
 set(chipmunk_demos_include_dirs
   ${chipmunk_SOURCE_DIR}/include/chipmunk
   ${GLUT_INCLUDE_DIR}
@@ -11,6 +17,7 @@
   chipmunk_static
   ${GLUT_LIBRARIES}
   ${OPENGL_LIBRARIES}
+  ${MATH_LIB}
 )
 
 file(GLOB chipmunk_demos_source_files "*.c")
--- chipmunk-5.3.4.orig/src/CMakeLists.txt
+++ chipmunk-5.3.4/src/CMakeLists.txt
@@ -15,7 +15,7 @@ if(BUILD_SHARED)
     ${chipmunk_source_files}
   )
   # set the lib's version number
-  set_target_properties(chipmunk PROPERTIES VERSION 5.3.4)
+  set_target_properties(chipmunk PROPERTIES SOVERSION 0d1 VERSION 0d1.0.0)
   install(TARGETS chipmunk RUNTIME DESTINATION lib LIBRARY DESTINATION lib)
 endif(BUILD_SHARED)
 

Reply to: