[fink:package-submissions] Re: #5008 fix libgraphviz238-shlibs-2.38.0-8 to build on 10.13

Jack Howarth via Fink-tracker <[email protected]>
Newsgroups gmane.os.apple.fink.tracker
Message-ID </p/fink/package-submissions/5008/348bf1b1c18bb17b371beca4b15bfc6273ab8425.package-submissions@fink.p.sourceforge.net>
Diff to current info file for new libgraphviz238-shlibs_2.40.1-1

~~~
Index: libgraphviz238-shlibs.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/graphics/libgraphviz238-shlibs.info,v
retrieving revision 1.5
diff -u -r1.5 libgraphviz238-shlibs.info
--- libgraphviz238-shlibs.info	12 Nov 2016 11:54:57 -0000	1.5
+++ libgraphviz238-shlibs.info	20 Sep 2017 10:16:45 -0000
@@ -1,8 +1,8 @@
 Info3: <<
 Package: libgraphviz238%type_pkg[var]-shlibs
 Type: var (. -nox)
-Version: 2.38.0
-Revision: 8
+Version: 2.40.1
+Revision: 1
 License: OSI-Approved
 # License: Common Public License 1.0
 Maintainer: David Fang <[email protected]>
@@ -15,9 +15,9 @@
 nam-US: http://www.graphviz.org/pub/graphviz
 <<
 SourceDirectory: graphviz-%v
-Source-MD5: 5b6a829b2ac94efcd5fa3c223ed6d3ae
+Source-MD5: 4ea6fd64603536406166600bcc296fc8
 PatchFile: libgraphviz238-shlibs.patch
-PatchFile-MD5: 40a6041cbf8f424188ab0886e0508b7b
+PatchFile-MD5: 66c0a39eec88255546e30693308dc69e
 PatchScript: <<
 	#!/bin/sh -ev
 	sed -e 's|@FINKPREFIX@|%p|g' -e 's|@PKGVERSION@|graphviz-2.38|g' < %{PatchFile} | patch -p1
@@ -30,11 +30,19 @@
 	done
 	sed -i.orig -e '/am__append_5/s|LIBLTDL|LTDLDEPS|' lib/gvc/Makefile.in
 
+	# 10.9 and below only. Remove once we drop 10.9 support
 	darwin_vers=`uname -r | cut -d. -f1`
 	test "$darwin_vers" -le 13 ||
-	sed -i.orig -e '/#include <CGGLContext\.h>/d' plugin/quartz/gvloadimage_quartz.c                                              
+	sed -i.orig -e '/#include <CGGLContext\.h>/d' plugin/quartz/gvloadimage_quartz.c
+
 	# Patch configure to not link like Puma on Yosemite
 	perl -pi.bak -e 's|10\.\[012\]\*|10.[012][,.]*|g' configure
+
+	# No /usr/lib/tclConfig.sh or /usr/lib/tkConfig.sh on 10.13
+	test "$darwin_vers" -le 16 ||
+	perl -pi -e 's|\$\{TCLSH_EXEC_PREFIX\}/lib/tclConfig.sh|/System/Library/Frameworks/Tcl.framework/tclConfig.sh|g' configure
+	test "$darwin_vers" -le 16 ||
+	perl -pi -e 's|\$\{WISH_EXEC_PREFIX\}/lib/tkConfig.sh|/System/Library/Frameworks/Tk.framework/tkConfig.sh|g' configure
 <<
 GCC: 4.0
 Depends: <<
@@ -151,7 +159,6 @@
 # other possible configure params:
 # LDFLAGS=-L%p/lib/ocaml
 # OCAML_LIBS=-L%p/lib/ocaml
-UseMaxBuildJobs: true
 CompileScript: <<
 	#!/bin/sh -ev
 	ruby_h_path=`find /usr/lib/ruby -name ruby.h | head -n 1`
@@ -197,7 +204,7 @@
 	fink-package-precedence --prohibit-bdep=%n238-dev .
  	echo "rtest.sh looks intended for post-install checking"
 	# upstream fix to rtest.sh
-	perl -pi -e "s,rrtest,'rtest," rtest/rtest.sh
+	#perl -pi -e "s,rrtest,'rtest," rtest/rtest.sh
 	# cd rtest && ./rtest.sh -v || exit 2
 	<<
 	TestSuiteSize: small
@@ -240,13 +247,13 @@
 	%p/lib/graphviz-2.38/graphviz/tcl/libtcldot.0.dylib 1.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/graphviz/tcl/libtcldot_builtin.0.dylib 1.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/graphviz/tcl/libtclplan.0.dylib 1.0.0 %n (>= 2.38.0-1)
-	(%type_raw[var] = .) %p/lib/graphviz-2.38/graphviz/tcl/libtkspline.0.dylib 1.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libcgraph.6.dylib 7.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libcdt.5.dylib 6.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libgvc.6.dylib 7.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libpathplan.4.dylib 5.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libgvpr.2.dylib 3.0.0 %n (>= 2.38.0-1)
 	%p/lib/graphviz-2.38/libxdot.4.dylib 5.0.0 %n (>= 2.38.0-1)
+	%p/lib/graphviz-2.38/liblab_gamut.1.dylib 2.0.0 %n (>= 2.40.1-1)
 <<
 # rtest/rtest.sh is intended as a installcheck-time script
 SplitOff: <<
@@ -265,7 +272,11 @@
 		Don't know what these are about...
 	<<
 	DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README
-	PostInstScript: %p/bin/dot -c
+	
+	PostInstScript: <<
+		# configure the plugins upon install
+		%p/bin/dot -c
+	<<
 <<
 SplitOff2: <<
 	Package: libgraphviz238%type_pkg[var]-dev
@@ -290,11 +301,11 @@
 		lib/graphviz-2.38/libgvpr.dylib
 		lib/graphviz-2.38/libpathplan.dylib
 		lib/graphviz-2.38/libxdot.dylib
+		lib/graphviz-2.38/liblab_gamut.dylib
 		(%type_raw[var] = .) lib/graphviz-2.38/graphviz/tcl/libgdtclft.dylib
 		lib/graphviz-2.38/graphviz/tcl/libtcldot.dylib
 		lib/graphviz-2.38/graphviz/tcl/libtcldot_builtin.dylib
 		lib/graphviz-2.38/graphviz/tcl/libtclplan.dylib
-		(%type_raw[var] = .) lib/graphviz-2.38/graphviz/tcl/libtkspline.dylib
 		lib/graphviz-2.38/graphviz/libgvplugin_core.dylib
 		lib/graphviz-2.38/graphviz/libgvplugin_dot_layout.dylib
 		(%type_raw[var] = .) lib/graphviz-2.38/graphviz/libgvplugin_gd.dylib
@@ -311,7 +322,7 @@
 	<<
 	DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README
 <<
-PostRmScript: rm -f %p/lib/graphviz-2.38/graphvz/config*
+PostRmScript: rm -f %p/lib/graphviz-2.38/graphviz/config*
 DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS README
 # there are more doc files
 Description: Graph visualization software (shared libs)
~~~


---

** [package-submissions:#5008] fix libgraphviz238-shlibs-2.38.0-8 to build on 10.13**

**Status:** open
**Group:** Undergoing_Validation
**Created:** Wed Sep 20, 2017 01:07 AM UTC by Jack Howarth
**Last Updated:** Wed Sep 20, 2017 04:12 AM UTC
**Owner:** David Fang


The following Info file changes allow the current graphviz238-shlibs-2.38.0-8 to build on 10;.13...

~~~
Index: libgraphviz238-shlibs.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/graphics/libgraphviz238-shlibs.info,v
retrieving revision 1.5
diff -u -r1.5 libgraphviz238-shlibs.info
--- libgraphviz238-shlibs.info	12 Nov 2016 11:54:57 -0000	1.5
+++ libgraphviz238-shlibs.info	20 Sep 2017 01:05:46 -0000
@@ -35,6 +35,12 @@
 	sed -i.orig -e '/#include <CGGLContext\.h>/d' plugin/quartz/gvloadimage_quartz.c                                              
 	# Patch configure to not link like Puma on Yosemite
 	perl -pi.bak -e 's|10\.\[012\]\*|10.[012][,.]*|g' configure
+
+	# No /usr/lib/tclConfig.sh or /usr/lib/tkConfig.sh on 10.13
+	test "$darwin_vers" -le 16 ||
+	perl -pi -e 's|\$\{TCLSH_EXEC_PREFIX\}/lib/tclConfig.sh|/System/Library/Frameworks/Tcl.framework/tclConfig.sh|g' configure
+	test "$darwin_vers" -le 16 ||
+	perl -pi -e 's|\$\{WISH_EXEC_PREFIX\}/lib/tkConfig.sh|/System/Library/Frameworks/Tk.framework/tkConfig.sh|g' configure
 <<
 GCC: 4.0
 Depends: <<
@@ -139,6 +145,7 @@
 	(%type_raw[var] = -nox) --without-rsvg \
 	(%type_raw[var] = -nox) --without-libgd \
 	(%type_raw[var] = -nox) --without-gts \
+	--enable-php=no \
 	--disable-r \
 	--disable-perl \
 	--disable-python \
@@ -280,7 +287,6 @@
 		lib/graphviz-2.38/graphviz/*.la
 		lib/graphviz-2.38/graphviz/guile/*.la
 		lib/graphviz-2.38/graphviz/lua/*.la
-		lib/graphviz-2.38/graphviz/php/*.la
 		lib/graphviz-2.38/graphviz/ruby/*.la
 		lib/graphviz-2.38/graphviz/tcl/*.la
 		lib/pkgconfig
~~~

The building of php support is disabled for the moment as I don't see a solution to the compiler errors...

~~~
gv_php.cpp:835:51: error: use of undeclared identifier 'rsrc'
static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) { (void)rsrc; }
                                                  ^
gv_php.cpp:858:7: error: use of undeclared identifier 'ZEND_REGISTER_RESOURCE'
      ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
      ^
gv_php.cpp:879:7: error: use of undeclared identifier 'MAKE_STD_ZVAL'
      MAKE_STD_ZVAL(resource);
      ^
gv_php.cpp:880:7: error: use of undeclared identifier 'ZEND_REGISTER_RESOURCE'
      ZEND_REGISTER_RESOURCE(resource, value, *(int *)(type->clientdata));
      ^
gv_php.cpp:885:18: error: no matching function for call to 'zend_lookup_class'
        result = zend_lookup_class(classname, SWIG_PREFIX_LEN + type_name_len, &ce TSRMLS_CC);
                 ^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_execute.h:43:28: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zend_class_entry *zend_lookup_class(zend_string *name);
                           ^
gv_php.cpp:888:18: error: no matching function for call to 'zend_lookup_class'
        result = zend_lookup_class((char *)type_name, type_name_len, &ce TSRMLS_CC);
                 ^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_execute.h:43:28: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zend_class_entry *zend_lookup_class(zend_string *name);
                           ^
gv_php.cpp:897:7: error: no member named 'is_ref' in '_zval_struct'
      Z_SET_ISREF_P(z);
      ^~~~~~~~~~~~~~~~
gv_php.cpp:771:32: note: expanded from macro 'Z_SET_ISREF_P'
# define Z_SET_ISREF_P(z) (z)->is_ref = 1
                          ~~~  ^
gv_php.cpp:898:69: error: too many arguments provided to function-like macro invocation
      zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
                                                                    ^
/usr/include/php/Zend/zend_hash.h:83:9: note: macro 'zend_hash_update' defined here
#define zend_hash_update(ht, key, pData) \
        ^
gv_php.cpp:898:7: error: use of undeclared identifier 'zend_hash_update'; did you mean '_zend_hash_update'?
      zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
      ^~~~~~~~~~~~~~~~
      _zend_hash_update
/usr/include/php/Zend/zend_hash.h:78:30: note: '_zend_hash_update' declared here
ZEND_API zval* ZEND_FASTCALL _zend_hash_update(HashTable *ht, zend_string *key,zval *pData ZEND_FILE_LINE_DC);
                             ^
gv_php.cpp:898:7: warning: expression result unused [-Wunused-value]
      zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
      ^~~~~~~~~~~~~~~~
gv_php.cpp:953:35: error: use of undeclared identifier 'zend_list_find'; did you mean 'zend_hash_find'?
  value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
                                  ^~~~~~~~~~~~~~
                                  zend_hash_find
/usr/include/php/Zend/zend_hash.h:161:30: note: 'zend_hash_find' declared here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                             ^
gv_php.cpp:953:50: error: cannot initialize a parameter of type 'const HashTable *' (aka 'const _zend_array *') with an lvalue of type 'zend_long'
      (aka 'long long')
  value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
                                                 ^~~~~~~~~~~~~
/usr/include/php/Zend/zend_hash.h:161:62: note: passing argument to parameter 'ht' here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                                                             ^
gv_php.cpp:960:13: error: no matching function for call to 'zend_rsrc_list_get_rsrc_type'
  type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_list.h:68:22: note: candidate function not viable: no known conversion from 'zend_long' (aka 'long long') to
      'zend_resource *' (aka '_zend_resource *') for 1st argument
ZEND_API const char *zend_rsrc_list_get_rsrc_type(zend_resource *res);
                     ^
gv_php.cpp:974:14: error: no member named 'type' in '_zval_struct'
  switch (z->type) {
          ~  ^
gv_php.cpp:1002:3: error: use of undeclared identifier 'MAKE_STD_ZVAL'
  MAKE_STD_ZVAL(pointer);
  ^
gv_php.cpp:1004:7: error: no matching function for call to 'zend_get_constant'
  if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) {
      ^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_constants.h:69:16: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zval *zend_get_constant(zend_string *name);
               ^
gv_php.cpp:1005:18: error: no member named 'type' in '_zval_struct'
    if (pointer->type == IS_LONG) {
        ~~~~~~~  ^
gv_php.cpp:1009:3: error: use of undeclared identifier 'FREE_ZVAL'
  FREE_ZVAL(pointer);
  ^
gv_php.cpp:1073:30: error: no matching function for call to '_zend_get_parameters_array_ex'
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:260:2: note: expanded from macro 'zend_get_parameters_array_ex'
        _zend_get_parameters_array_ex(param_count, argument_array)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:252:14: note: candidate function not viable: no known conversion from 'zval **[2]' to 'zval *' (aka '_zval_struct *')
      for 2nd argument
ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array);
             ^
gv_php.cpp:1077:35: error: use of undeclared identifier 'zend_list_find'; did you mean 'zend_hash_find'?
  value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
                                  ^~~~~~~~~~~~~~
                                  zend_hash_find
/usr/include/php/Zend/zend_hash.h:161:30: note: 'zend_hash_find' declared here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[4]: *** [libgv_php_la-gv_php.lo] Error 1
~~~

Tested on 10.13 with 'fink -m'.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/fink/package-submissions/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/fink/admin/package-submissions/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Fink-tracker mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.tracker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.