shinyspirtomb / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Use system zlib on OSX #540

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
At the moment, to compile mupen64plus-core on OSX, you need to create zlib.pc 
in pkg-config. zlib already ships with OSX, so it would make sense to use the 
system's zlib, which is simply using the LDFLAG -lz.

I already sent a pull request for it: 
https://bitbucket.org/richard42/mupen64plus-core/pull-request/41/use-system-zlib
-on-osx/diff

Original issue reported on code.google.com by n.pepi...@gmail.com on 20 Jan 2013 at 8:50

GoogleCodeExporter commented 8 years ago
Thanks. I've also changed it in the Makefile for mupen64plus-video-glide64mk2

Original comment by s...@narfation.org on 21 Jan 2013 at 7:24

GoogleCodeExporter commented 8 years ago

Original comment by s...@narfation.org on 21 Jan 2013 at 7:24

GoogleCodeExporter commented 8 years ago
In fact, it might be better to just use environment variables in all projects, 
i.e. ZLIB_LIBS, ZLIB_CFLAGS, GL_LIBS, GL_CFLAGS, etc., variables which would be 
set in the makefile if and only if they had not been set beforehand. That would 
avoid some patching for package distributors and possibly eschew the dependency 
on pkg-config for systems which don't use it so much.

Original comment by n.pepi...@gmail.com on 21 Jan 2013 at 9:03

GoogleCodeExporter commented 8 years ago
I started to implement the requested changes in https://bitbucket.org/ecsv/ 
(the repositories with the -fixes). Can you please do me a favor and test them? 
Thanks

Original comment by s...@narfation.org on 11 May 2013 at 1:08

GoogleCodeExporter commented 8 years ago
It doesn't work at the moment due to a minor error. You make a check for the 
origin of the ZLIB_CFLAGS and ZLIB_LDLIBS variables which fails on OSX -- but 
it's not necessary to make on OSX at all, since we're just using the system 
libraries (LDLIBS += -lz). Just wrap everything for zlib in a if/else for a 
separate OSX case I guess?

Original comment by n.pepi...@gmail.com on 11 May 2013 at 2:46

GoogleCodeExporter commented 8 years ago
I am against this approach because we will wrap up in many if else and get 
deeper and deeper everytime. better make use of the new ZLIB_LDLIBS. I will 
propose the change for mupen64plus-core-fixes and 
mupen64plus-video-glide64mk2-fixes

Original comment by s...@narfation.org on 12 May 2013 at 10:01

GoogleCodeExporter commented 8 years ago
Then in the OSX case, instead of just doing LDLIBS += -lz, we can set the 
ZLIB_CFLAGS and ZLIB_LDLIBS. Would that work?

Original comment by n.pepi...@gmail.com on 12 May 2013 at 1:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You have to tell me. I did the change last weekend and now I am waiting for a 
confirmation ;)

Original comment by s...@narfation.org on 18 May 2013 at 7:14

GoogleCodeExporter commented 8 years ago
Sorry for the late reply; it works perfectly :)

Original comment by n.pepi...@gmail.com on 20 May 2013 at 12:58

GoogleCodeExporter commented 8 years ago
Thanks for the tests

Original comment by s...@narfation.org on 22 May 2013 at 6:53