{"id":17435624,"url":"https://github.com/xaionaro-go/pkg-config-wrapper","last_synced_at":"2026-05-25T20:31:43.859Z","repository":{"id":257827747,"uuid":"871336410","full_name":"xaionaro-go/pkg-config-wrapper","owner":"xaionaro-go","description":"A wrapper for `pkg-config` to force static linking when needed","archived":false,"fork":false,"pushed_at":"2024-10-13T15:15:41.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T03:17:39.959Z","etag":null,"topics":["build","compile","go","golang","libraries","library","link","linking","pkg-config","pkgconfig","static","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xaionaro-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T18:41:11.000Z","updated_at":"2024-10-13T15:15:44.000Z","dependencies_parsed_at":"2024-10-17T09:17:06.377Z","dependency_job_id":null,"html_url":"https://github.com/xaionaro-go/pkg-config-wrapper","commit_stats":null,"previous_names":["xaionaro-go/pkg-config-wrapper","xaionaro-go/pkg-config-static","xaionaro-go/pkg-config"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fpkg-config-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fpkg-config-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fpkg-config-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fpkg-config-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xaionaro-go","download_url":"https://codeload.github.com/xaionaro-go/pkg-config-wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245950514,"owners_count":20699085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","compile","go","golang","libraries","library","link","linking","pkg-config","pkgconfig","static","wrapper"],"created_at":"2024-10-17T10:00:50.889Z","updated_at":"2025-12-15T01:20:14.013Z","avatar_url":"https://github.com/xaionaro-go.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nThis is a minimalistic wrapper for `pkg-config` that allows to control which libraries should be linked dynamically or statically using two additional environment variables:\n* `PKG_CONFIG_LIBS_FORCE_STATIC`\n* `PKG_CONFIG_LIBS_FORCE_DYNAMIC`\n\nInitially I had to implement this tool to make sure the CGo libraries I have as dependencies for my Android application are linked statically, because otherwise [it did not work](https://github.com/fyne-io/fyne/issues/5189).\n\n# How to use\n\n```sh\ngo install github.com/xaionaro-go/pkg-config-wrapper@latest\nPKG_CONFIG_LIBS_FORCE_STATIC=\"libav*,libvlc\" PKG_CONFIG=\"$(go env GOPATH | awk -F ':' '{print $1}')/bin/pkg-config\" go build PATH/TO/MY/PROJECT\n```\n\nIt works not only with Go, but also with anything that understands variable `PKG_CONFIG`.\n\n# Example of the output\n```\n$ go run ./ --libs-only-l libavcodec\n-lavcodec\n```\nvs:\n```\n$ PKG_CONFIG_LIBS_FORCE_STATIC=libav* go run ./ --libs-only-l libavcodec\n-Wl,-Bstatic -lavcodec -lvpx -lm -lvpx -lm -lvpx -lm -lvpx -lm -lwebpmux -lm -latomic -llzma -laribb24 -ldav1d -ldavs2 -lopencore-amrwb -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -lzvbi -lpthread -lm -lpng -lz -lsnappy -lstdc++ -laom -lcodec2 -lfdk-aac -lgsm -lilbc -ljxl -ljxl_threads -lmp3lame -lm -lopencore-amrnb -lopenjp2 -lopus -lrav1e -lm -lshine -lspeex -lSvtAv1Enc -ltheoraenc -ltheoradec -logg -ltwolame -lvo-amrwbenc -lvorbis -lvorbisenc -lwebp -lx264 -lx265 -lxavs2 -lxvidcore -lopenh264 -lkvazaar -lz -lva -lvpl -ldl -lstdc++ -lswresample -lm -lsoxr -latomic -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lgcrypt -lm -ldrm -lvpl -ldl -lstdc++ -lOpenCL -lssl -lcrypto -lva -latomic -lX11 -lavutil -lva-drm -lva -lva-x11 -lva -lvdpau -lX11 -lgcrypt -lm -ldrm -lvpl -ldl -lstdc++ -lOpenCL -lssl -lcrypto -lva -latomic -lX11\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaionaro-go%2Fpkg-config-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxaionaro-go%2Fpkg-config-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaionaro-go%2Fpkg-config-wrapper/lists"}