The effect of this updated patch is to use the CMake to link against
the external -lpcre3 and -ljpeg which have also been added to the
Build-Depends. In order to convince the CMake to use the external .c
files, debian/rules gains a command to isolate the relevant .c and .h
files and delete them.

I plan to upload with this revised patch.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

diffstat for squeak-vm-4.4.7.2357 squeak-vm-4.4.7.2357

 changelog                                |   12 ++++
 control                                  |    2 
 patches/reenable-gcc-optimisations.patch |   24 ++++++++
 patches/remove-embedded-pcre.diff        |   92 +++++++++++++++++++++++++++++++
 patches/series                           |    2 
 rules                                    |    4 +
 6 files changed, 135 insertions(+), 1 deletion(-)

diff -Nru squeak-vm-4.4.7.2357/debian/changelog squeak-vm-4.4.7.2357/debian/changelog
--- squeak-vm-4.4.7.2357/debian/changelog	2011-05-08 14:03:12.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/changelog	2012-03-03 17:32:02.000000000 +0000
@@ -1,3 +1,15 @@
+squeak-vm (1:4.4.7.2357-1.1) unstable; urgency=low
+
+  [ Hector Oron ]
+  * Non-maintainer upload.
+  * Fix FTBFS (arm): unrecognized command line option '-mno-fused-madd'
+    - Thanks Ricardo Salveti de Araujo for patch. (Closes: #634240)
+
+  [ Neil Williams ]
+  * Adapt CMake to not build embedded libraries.
+
+ -- Neil Williams <codeh...@debian.org>  Sat, 03 Mar 2012 17:32:01 +0000
+
 squeak-vm (1:4.4.7.2357-1) unstable; urgency=low
 
   * New upstream release (Closes: #625861)
diff -Nru squeak-vm-4.4.7.2357/debian/control squeak-vm-4.4.7.2357/debian/control
--- squeak-vm-4.4.7.2357/debian/control	2011-05-08 14:15:18.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/control	2012-03-03 20:28:15.000000000 +0000
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Squeak Team <pkg-squeak-de...@lists.alioth.debian.org>
 Uploaders: José L. Redrejo Rodríguez <jredr...@debian.org>
-Build-Depends: debhelper (>= 5.0.42), autotools-dev, quilt, cmake (>= 2.6.2), libxt-dev, libgl1-mesa-dev, libasound2-dev, uuid-dev, libspeex-dev, libxtst-dev, libxrender-dev, sharutils, libffi-dev, libdbus-1-dev, libgstreamer0.10-dev, libvorbis-dev,  libfreetype6-dev, libpango1.0-dev, libcairo2-dev, libpulse-dev
+Build-Depends: debhelper (>= 5.0.42), autotools-dev, quilt, cmake (>= 2.6.2), libxt-dev, libgl1-mesa-dev, libasound2-dev, uuid-dev, libspeex-dev, libxtst-dev, libxrender-dev, sharutils, libffi-dev, libdbus-1-dev, libgstreamer0.10-dev, libvorbis-dev,  libfreetype6-dev, libpango1.0-dev, libcairo2-dev, libpulse-dev, libjpeg8-dev, libpcre3-dev
 Standards-Version: 3.9.2
 Homepage: http://www.squeakvm.org/unix/
 
diff -Nru squeak-vm-4.4.7.2357/debian/patches/reenable-gcc-optimisations.patch squeak-vm-4.4.7.2357/debian/patches/reenable-gcc-optimisations.patch
--- squeak-vm-4.4.7.2357/debian/patches/reenable-gcc-optimisations.patch	1970-01-01 01:00:00.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/patches/reenable-gcc-optimisations.patch	2012-03-03 17:31:40.000000000 +0000
@@ -0,0 +1,24 @@
+Patch: SVN rev 2374
+http://lists.squeak.org/pipermail/vm-dev/2011-June/008330.html
+
+Index: unix/plugins/FloatMathPlugin/config.cmake
+===================================================================
+--- a/unix/plugins/FloatMathPlugin/config.cmake	(revision 2373)
++++ b/unix/plugins/FloatMathPlugin/config.cmake	(revision 2374)
+@@ -7,10 +7,10 @@
+   PLUGIN_DEFINITIONS (-D__LITTLE_ENDIAN=1)
+ ENDIF ()
+ 
++SET (LIBM_CFLAGS "${CMAKE_C_FLAGS}")
++
+ # GCC optimizations break fdlibm so disable them for now.
+-
+-IF (CMAKE_COMPILER_IS_GNUCC)
+-  SET (LIBM_CFLAGS "${CMAKE_C_FLAGS} -O0 -mno-fused-madd")
+-ELSE ()
+-  SET (LIBM_CFLAGS "${CMAKE_C_FLAGS}")
+-ENDIF ()
++# 
++# IF (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
++#   SET (LIBM_CFLAGS "${CMAKE_C_FLAGS} -O0 -mno-fused-madd")
++# ENDIF ()
diff -Nru squeak-vm-4.4.7.2357/debian/patches/remove-embedded-pcre.diff squeak-vm-4.4.7.2357/debian/patches/remove-embedded-pcre.diff
--- squeak-vm-4.4.7.2357/debian/patches/remove-embedded-pcre.diff	1970-01-01 01:00:00.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/patches/remove-embedded-pcre.diff	2012-03-03 20:23:11.000000000 +0000
@@ -0,0 +1,92 @@
+Description: Disable use of internal pcre.c
+ .
+ squeak-vm (1:4.4.7.2357-1.1) unstable; urgency=low
+ .
+   [ Hector Oron ]
+   * Non-maintainer upload.
+   * Fix FTBFS (arm): unrecognized command line option '-mno-fused-madd'
+     - Thanks Ricardo Salveti de Araujo for patch. (Closes: #634240)
+ .
+   [ Neil Williams ]
+   * Adapt CMake to not build embedded libraries.
+Author: Neil Williams <codeh...@debian.org>
+Bug-Debian: http://bugs.debian.org/634240
+
+---
+
+Index: squeak-vm-4.4.7.2357/unix/CMakeLists.txt
+===================================================================
+--- squeak-vm-4.4.7.2357.orig/unix/CMakeLists.txt	2012-03-03 20:22:06.000000000 +0000
++++ squeak-vm-4.4.7.2357/unix/CMakeLists.txt	2012-03-03 20:22:08.000000000 +0000
+@@ -103,6 +103,9 @@
+   USE_LIBRARY ("-framework ${fwk}")
+ ENDMACRO (USE_FRAMEWORK)
+ 
++USE_LIBRARY ("-lpcre")
++USE_LIBRARY ("-ljpeg")
++
+ MACRO (CONFIG_DEFINE var)
+   LIST (APPEND config_vars "${var}")
+ ENDMACRO (CONFIG_DEFINE var)
+Index: squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h
+===================================================================
+--- squeak-vm-4.4.7.2357.orig/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h	2012-03-03 20:22:06.000000000 +0000
++++ squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h	2012-03-03 20:22:08.000000000 +0000
+@@ -12,6 +12,7 @@
+ typedef struct error_mgr2* error_ptr2;
+ 
+ void error_exit (j_common_ptr cinfo);
+-GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize);
++//GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize);
+ GLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize);
+-GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize);
+\ No newline at end of file
++//GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize);
++
+Index: squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c
+===================================================================
+--- squeak-vm-4.4.7.2357.orig/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c	2012-03-03 20:22:06.000000000 +0000
++++ squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c	2012-03-03 20:22:08.000000000 +0000
+@@ -149,7 +149,7 @@
+ METHODDEF(void) term_source (j_decompress_ptr cinfo) {
+   /* no work necessary here */
+ }
+-
++#if 0
+ /*
+  * Prepare for input from a stdio stream.
+  * The caller must have already opened the stream, and is responsible
+@@ -187,6 +187,7 @@
+   src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
+   src->pub.next_input_byte = NULL; /* until buffer loaded */
+ }
++#endif
+ /* This function allows data to be moved if necessary */
+ GLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize) {
+   my_src_ptr src;
+@@ -198,4 +199,4 @@
+   src->actualPos = pSourceData + offset;
+ 
+   return((src->actualPos + src->bytesLeft) == (pSourceData + sourceDataSize));
+-}
+\ No newline at end of file
++}
+Index: squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/jmemdatadst.c
+===================================================================
+--- squeak-vm-4.4.7.2357.orig/Cross/plugins/JPEGReadWriter2Plugin/jmemdatadst.c	2012-03-03 20:19:38.000000000 +0000
++++ squeak-vm-4.4.7.2357/Cross/plugins/JPEGReadWriter2Plugin/jmemdatadst.c	2012-03-03 20:23:07.000000000 +0000
+@@ -113,7 +113,7 @@
+       ERREXIT(cinfo, JERR_FILE_WRITE);
+   }
+ }
+-
++#if 0
+ /*
+  * Prepare for output to a stdio stream.
+  * The caller must have already opened the stream, and is responsible
+@@ -143,3 +143,5 @@
+   dest->pSpaceUsed = pDestinationSize;
+   *(dest->pSpaceUsed) = 0;
+ }
++#endif
++
diff -Nru squeak-vm-4.4.7.2357/debian/patches/series squeak-vm-4.4.7.2357/debian/patches/series
--- squeak-vm-4.4.7.2357/debian/patches/series	2011-05-07 19:41:16.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/patches/series	2012-03-03 18:51:54.000000000 +0000
@@ -2,3 +2,5 @@
 mpeg_includes.patch
 #npsqueak.patch
 linex.patch
+reenable-gcc-optimisations.patch
+remove-embedded-pcre.diff
diff -Nru squeak-vm-4.4.7.2357/debian/rules squeak-vm-4.4.7.2357/debian/rules
--- squeak-vm-4.4.7.2357/debian/rules	2011-05-08 14:15:09.000000000 +0100
+++ squeak-vm-4.4.7.2357/debian/rules	2012-03-03 20:17:59.000000000 +0000
@@ -53,6 +53,10 @@
 	#put svn version for the squeak lib directory:
 #	echo $(svnversion)>unix/svnversion
 	# Perform an out-of-tree build to keep a clean source tree
+	$(RM) Cross/plugins/RePlugin/pcre.c
+	$(RM) Cross/plugins/RePlugin/pcre.h
+	find Cross/plugins/JPEGReadWriter2Plugin/ -not -name 'jmemd*.c' -and -name 'j*.c' -delete
+	find Cross/plugins/JPEGReadWriter2Plugin/ -not -name 'jinclude.h' -and -name 'j*.h' -delete
 	mkdir $(BUILD_TREE)
 	cd $(BUILD_TREE); ../unix/cmake/configure $(CONFIG_OPTS) \
 		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)  \

Attachment: pgpnNlI4Bhi8p.pgp
Description: PGP signature

Reply via email to