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

Hanspeter Niederstrasser via Fink-tracker <[email protected]> Tue, 17 Oct 2017 03:32:35 +0000
Newsgroups gmane.os.apple.fink.tracker
Message-ID </p/fink/package-submissions/5008/0e36d1b3606aceddad8379e1912db31452af635c.package-submissions@fink.p.sourceforge.net>
Updated with moving all language specific .la files to -shlibs to be alongside the <language>/libgv_<language>.so


Attachments:

- [libgraphviz238-shlibs.info](https://sourceforge.net/p/fink/package-submissions/_discuss/thread/a078b9d1/bb24/attachment/libgraphviz238-shlibs.info) (15.4 kB; application/octet-stream)
- [libgraphviz238-shlibs.patch](https://sourceforge.net/p/fink/package-submissions/_discuss/thread/a078b9d1/bb24/attachment/libgraphviz238-shlibs.patch) (10.9 kB; application/octet-stream)


---

** [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:** Mon Oct 09, 2017 11:26 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