{"action":"created","issue":{"url":"https://api.github.com/repos/hoene/libmysofa/issues/49","repository_url":"https://api.github.com/repos/hoene/libmysofa","labels_url":"https://api.github.com/repos/hoene/libmysofa/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/hoene/libmysofa/issues/49/comments","events_url":"https://api.github.com/repos/hoene/libmysofa/issues/49/events","html_url":"https://github.com/hoene/libmysofa/issues/49","id":320629455,"number":49,"title":"Add Match and Zlib as possible private libs to the pkg-config file","user":{"login":"Reino17","id":8537830,"avatar_url":"https://avatars3.githubusercontent.com/u/8537830?v=4","gravatar_id":"","url":"https://api.github.com/users/Reino17","html_url":"https://github.com/Reino17","followers_url":"https://api.github.com/users/Reino17/followers","following_url":"https://api.github.com/users/Reino17/following{/other_user}","gists_url":"https://api.github.com/users/Reino17/gists{/gist_id}","starred_url":"https://api.github.com/users/Reino17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Reino17/subscriptions","organizations_url":"https://api.github.com/users/Reino17/orgs","repos_url":"https://api.github.com/users/Reino17/repos","events_url":"https://api.github.com/users/Reino17/events{/privacy}","received_events_url":"https://api.github.com/users/Reino17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-06T21:20:44Z","updated_at":"2018-05-06T21:27:02Z","closed_at":null,"author_association":"NONE","body":"(already posted [here](https://github.com/hoene/libmysofa/issues/38#issuecomment-385213553), but as this issue is already closed, probably no one is notified)\r\n\r\nAt this moment FFmpeg still manually links libmysofa **and** its dependencies.\r\nThis works, but I had a look to have it use libmysofa's pkg-config file instead:\r\n```patch\r\ndiff --git a/configure b/configure\r\nindex 9fa1665..856bddf 100755\r\n--- a/configure\r\n+++ b/configure\r\n@@ -6000,7 +6000,8 @@ enabled libmfx            && { check_pkg_config libmfx libmfx \"mfx/mfxvideo.h\" M\r\n                                { require libmfx \"mfx/mfxvideo.h\" MFXInit \"-llibmfx $advapi32_extralibs\" && warn \"using libmfx without pkg-config\"; } }\r\n enabled libmodplug        && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load\r\n enabled libmp3lame        && require \"libmp3lame >= 3.98.3\" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs\r\n-enabled libmysofa         && require libmysofa \"mysofa.h\" mysofa_load -lmysofa $zlib_extralibs\r\n+enabled libmysofa         && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_load ||\r\n+                               require libmysofa mysofa.h mysofa_load -lmysofa $zlib_extralibs; }\r\n enabled libnpp            && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc ||\r\n                                check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc ||\r\n                                die \"ERROR: libnpp not found\"; }\r\n```\r\nThis works too, **but** only if '_libmysofa.pc_' is setup right! It needs `-lm` and `-lz`, as James already pointed out.\r\n\r\nI believe something like this is needed:\r\n```patch\r\ndiff --git a/libmysofa.pc.cmake b/libmysofa.pc.cmake\r\nindex f5413a9..0b2fb7a 100644\r\n--- a/libmysofa.pc.cmake\r\n+++ b/libmysofa.pc.cmake\r\n@@ -8,5 +8,5 @@ libdir=${prefix}/lib\r\n Libs: -L${libdir} -lmysofa\r\n Cflags: -I${includedir}\r\n \r\n-#Libs.private:\r\n+Libs.private: @PKG_CONFIG_MATH@ @PKG_CONFIG_ZLIB@\r\n #Requires.private:\r\ndiff --git a/src/CMakeLists.txt b/src/CMakeLists.txt\r\nindex 3c3c663..3fd8224 100644\r\n--- a/src/CMakeLists.txt\r\n+++ b/src/CMakeLists.txt\r\n@@ -14,7 +14,9 @@ configure_file (config.h.in ${PROJECT_SOURCE_DIR}/src/config.h)\r\n \r\n if(NOT MSVC)\r\n   find_library(MATH m)\r\n+  set(PKG_CONFIG_MATH \"-lm\")\r\n   include(FindZLIB)\r\n+  set(PKG_CONFIG_ZLIB \"-lz\")\r\n else()\r\n   set(MATH \"\")\r\n   find_program(NUGET nuget)\r\n```\r\nI'm still rather new to all of this. I don't know exactly how everything works in '_CMakeList.txt_'. The set commands are obviously in the wrong place, because `Libs.private:` remains empty in '_libmysofa.pc_'.\r\nI have no doubt you can work this out nicely."},"comment":{"url":"https://api.github.com/repos/hoene/libmysofa/issues/comments/386915994","html_url":"https://github.com/hoene/libmysofa/issues/49#issuecomment-386915994","issue_url":"https://api.github.com/repos/hoene/libmysofa/issues/49","id":386915994,"user":{"login":"hoene","id":7519642,"avatar_url":"https://avatars0.githubusercontent.com/u/7519642?v=4","gravatar_id":"","url":"https://api.github.com/users/hoene","html_url":"https://github.com/hoene","followers_url":"https://api.github.com/users/hoene/followers","following_url":"https://api.github.com/users/hoene/following{/other_user}","gists_url":"https://api.github.com/users/hoene/gists{/gist_id}","starred_url":"https://api.github.com/users/hoene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoene/subscriptions","organizations_url":"https://api.github.com/users/hoene/orgs","repos_url":"https://api.github.com/users/hoene/repos","events_url":"https://api.github.com/users/hoene/events{/privacy}","received_events_url":"https://api.github.com/users/hoene/received_events","type":"User","site_admin":false},"created_at":"2018-05-06T21:27:02Z","updated_at":"2018-05-06T21:27:02Z","author_association":"OWNER","body":"Shall I commit the changes?"}}
{"actor":{"display_login":"hoene"}}