Skip to content

Instantly share code, notes, and snippets.

@shkhln
Last active August 23, 2019 16:00
Show Gist options
  • Save shkhln/6af746f44030443b58db4c8186f0a7bc to your computer and use it in GitHub Desktop.
Save shkhln/6af746f44030443b58db4c8186f0a7bc to your computer and use it in GitHub Desktop.
% mkdir build
% cd build
% env CC=/compat/linux/bin/cc CFLAGS="-m32 --sysroot=/compat/linux" cmake -DCMAKE_INSTALL_PREFIX=/compat/linux/usr -DCMAKE_BUILD_TYPE=Release ..
% make
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15b2199..d0f1de1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,9 +5,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -fPIC -fvisibility=hidden")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
-find_package(PkgConfig REQUIRED)
-
-pkg_check_modules(REQ glib-2.0 alsa REQUIRED)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/compat/linux/usr/include/alsa")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/compat/linux/usr/include/glib-2.0")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/compat/linux/usr/lib/glib-2.0/include")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lasound")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lglib-2.0")
list(APPEND REQ_LIBRARIES m)
PORTNAME= alsa-lib-devel
PORTVERSION= 1.1.6
DISTVERSIONSUFFIX=-2.el7
CATEGORIES= audio linux
MAINTAINER= [email protected]
COMMENT= Advanced Linux Sound Architecture headers (Linux CentOS ${LINUX_DIST_VER})
LICENSE= GPLv3
USES= linux:c7
USE_LDCONFIG= yes
USE_LINUX_RPM= yes
CONFLICTS= linux-c6-${PORTNAME}-[0-9]*
SRC_DISTFILES=
.include <bsd.port.mk>
usr/include/alsa/asoundef.h
usr/include/alsa/asoundlib.h
usr/include/alsa/conf.h
usr/include/alsa/control.h
usr/include/alsa/control_external.h
usr/include/alsa/error.h
usr/include/alsa/global.h
usr/include/alsa/hwdep.h
usr/include/alsa/input.h
usr/include/alsa/mixer.h
usr/include/alsa/mixer_abst.h
usr/include/alsa/output.h
usr/include/alsa/pcm.h
usr/include/alsa/pcm_external.h
usr/include/alsa/pcm_extplug.h
usr/include/alsa/pcm_ioplug.h
usr/include/alsa/pcm_old.h
usr/include/alsa/pcm_plugin.h
usr/include/alsa/pcm_rate.h
usr/include/alsa/rawmidi.h
usr/include/alsa/seq.h
usr/include/alsa/seq_event.h
usr/include/alsa/seq_midi_event.h
usr/include/alsa/seqmid.h
usr/include/alsa/sound/asoc.h
usr/include/alsa/sound/asound_fm.h
usr/include/alsa/sound/emu10k1.h
usr/include/alsa/sound/hdsp.h
usr/include/alsa/sound/hdspm.h
usr/include/alsa/sound/sb16_csp.h
usr/include/alsa/sound/sscape_ioctl.h
usr/include/alsa/sound/tlv.h
usr/include/alsa/sound/type_compat.h
usr/include/alsa/timer.h
usr/include/alsa/topology.h
usr/include/alsa/use-case.h
usr/include/alsa/version.h
usr/include/sys/asoundlib.h
usr/lib/libasound.so
usr/lib64/libasound.so
PORTNAME= glib2-devel
PORTVERSION= 2.56.1
DISTVERSIONSUFFIX=-2.el7
CATEGORIES= devel linux
MAINTAINER= [email protected]
COMMENT= GLib headers (Linux CentOS ${LINUX_DIST_VER})
LICENSE= LGPL20
USES= linux:c7
USE_LDCONFIG= yes
USE_LINUX_RPM= yes
CONFLICTS= linux-c6-${PORTNAME}-[0-9]*
SRC_DISTFILES=
.include <bsd.port.mk>
usr/include/gio-unix-2.0/gio/gdesktopappinfo.h
usr/include/gio-unix-2.0/gio/gfiledescriptorbased.h
usr/include/gio-unix-2.0/gio/gunixconnection.h
usr/include/gio-unix-2.0/gio/gunixcredentialsmessage.h
usr/include/gio-unix-2.0/gio/gunixfdlist.h
usr/include/gio-unix-2.0/gio/gunixfdmessage.h
usr/include/gio-unix-2.0/gio/gunixinputstream.h
usr/include/gio-unix-2.0/gio/gunixmounts.h
usr/include/gio-unix-2.0/gio/gunixoutputstream.h
usr/include/gio-unix-2.0/gio/gunixsocketaddress.h
usr/include/glib-2.0/gio/gaction.h
usr/include/glib-2.0/gio/gactiongroup.h
usr/include/glib-2.0/gio/gactiongroupexporter.h
usr/include/glib-2.0/gio/gactionmap.h
usr/include/glib-2.0/gio/gappinfo.h
usr/include/glib-2.0/gio/gapplication.h
usr/include/glib-2.0/gio/gapplicationcommandline.h
usr/include/glib-2.0/gio/gasyncinitable.h
usr/include/glib-2.0/gio/gasyncresult.h
usr/include/glib-2.0/gio/gbufferedinputstream.h
usr/include/glib-2.0/gio/gbufferedoutputstream.h
usr/include/glib-2.0/gio/gbytesicon.h
usr/include/glib-2.0/gio/gcancellable.h
usr/include/glib-2.0/gio/gcharsetconverter.h
usr/include/glib-2.0/gio/gcontenttype.h
usr/include/glib-2.0/gio/gconverter.h
usr/include/glib-2.0/gio/gconverterinputstream.h
usr/include/glib-2.0/gio/gconverteroutputstream.h
usr/include/glib-2.0/gio/gcredentials.h
usr/include/glib-2.0/gio/gdatagrambased.h
usr/include/glib-2.0/gio/gdatainputstream.h
usr/include/glib-2.0/gio/gdataoutputstream.h
usr/include/glib-2.0/gio/gdbusactiongroup.h
usr/include/glib-2.0/gio/gdbusaddress.h
usr/include/glib-2.0/gio/gdbusauthobserver.h
usr/include/glib-2.0/gio/gdbusconnection.h
usr/include/glib-2.0/gio/gdbuserror.h
usr/include/glib-2.0/gio/gdbusinterface.h
usr/include/glib-2.0/gio/gdbusinterfaceskeleton.h
usr/include/glib-2.0/gio/gdbusintrospection.h
usr/include/glib-2.0/gio/gdbusmenumodel.h
usr/include/glib-2.0/gio/gdbusmessage.h
usr/include/glib-2.0/gio/gdbusmethodinvocation.h
usr/include/glib-2.0/gio/gdbusnameowning.h
usr/include/glib-2.0/gio/gdbusnamewatching.h
usr/include/glib-2.0/gio/gdbusobject.h
usr/include/glib-2.0/gio/gdbusobjectmanager.h
usr/include/glib-2.0/gio/gdbusobjectmanagerclient.h
usr/include/glib-2.0/gio/gdbusobjectmanagerserver.h
usr/include/glib-2.0/gio/gdbusobjectproxy.h
usr/include/glib-2.0/gio/gdbusobjectskeleton.h
usr/include/glib-2.0/gio/gdbusproxy.h
usr/include/glib-2.0/gio/gdbusserver.h
usr/include/glib-2.0/gio/gdbusutils.h
usr/include/glib-2.0/gio/gdrive.h
usr/include/glib-2.0/gio/gdtlsclientconnection.h
usr/include/glib-2.0/gio/gdtlsconnection.h
usr/include/glib-2.0/gio/gdtlsserverconnection.h
usr/include/glib-2.0/gio/gemblem.h
usr/include/glib-2.0/gio/gemblemedicon.h
usr/include/glib-2.0/gio/gfile.h
usr/include/glib-2.0/gio/gfileattribute.h
usr/include/glib-2.0/gio/gfileenumerator.h
usr/include/glib-2.0/gio/gfileicon.h
usr/include/glib-2.0/gio/gfileinfo.h
usr/include/glib-2.0/gio/gfileinputstream.h
usr/include/glib-2.0/gio/gfileiostream.h
usr/include/glib-2.0/gio/gfilemonitor.h
usr/include/glib-2.0/gio/gfilenamecompleter.h
usr/include/glib-2.0/gio/gfileoutputstream.h
usr/include/glib-2.0/gio/gfilterinputstream.h
usr/include/glib-2.0/gio/gfilteroutputstream.h
usr/include/glib-2.0/gio/gicon.h
usr/include/glib-2.0/gio/ginetaddress.h
usr/include/glib-2.0/gio/ginetaddressmask.h
usr/include/glib-2.0/gio/ginetsocketaddress.h
usr/include/glib-2.0/gio/ginitable.h
usr/include/glib-2.0/gio/ginputstream.h
usr/include/glib-2.0/gio/gio-autocleanups.h
usr/include/glib-2.0/gio/gio.h
usr/include/glib-2.0/gio/gioenums.h
usr/include/glib-2.0/gio/gioenumtypes.h
usr/include/glib-2.0/gio/gioerror.h
usr/include/glib-2.0/gio/giomodule.h
usr/include/glib-2.0/gio/gioscheduler.h
usr/include/glib-2.0/gio/giostream.h
usr/include/glib-2.0/gio/giotypes.h
usr/include/glib-2.0/gio/glistmodel.h
usr/include/glib-2.0/gio/gliststore.h
usr/include/glib-2.0/gio/gloadableicon.h
usr/include/glib-2.0/gio/gmemoryinputstream.h
usr/include/glib-2.0/gio/gmemoryoutputstream.h
usr/include/glib-2.0/gio/gmenu.h
usr/include/glib-2.0/gio/gmenuexporter.h
usr/include/glib-2.0/gio/gmenumodel.h
usr/include/glib-2.0/gio/gmount.h
usr/include/glib-2.0/gio/gmountoperation.h
usr/include/glib-2.0/gio/gnativevolumemonitor.h
usr/include/glib-2.0/gio/gnetworkaddress.h
usr/include/glib-2.0/gio/gnetworking.h
usr/include/glib-2.0/gio/gnetworkmonitor.h
usr/include/glib-2.0/gio/gnetworkservice.h
usr/include/glib-2.0/gio/gnotification.h
usr/include/glib-2.0/gio/goutputstream.h
usr/include/glib-2.0/gio/gpermission.h
usr/include/glib-2.0/gio/gpollableinputstream.h
usr/include/glib-2.0/gio/gpollableoutputstream.h
usr/include/glib-2.0/gio/gpollableutils.h
usr/include/glib-2.0/gio/gpropertyaction.h
usr/include/glib-2.0/gio/gproxy.h
usr/include/glib-2.0/gio/gproxyaddress.h
usr/include/glib-2.0/gio/gproxyaddressenumerator.h
usr/include/glib-2.0/gio/gproxyresolver.h
usr/include/glib-2.0/gio/gremoteactiongroup.h
usr/include/glib-2.0/gio/gresolver.h
usr/include/glib-2.0/gio/gresource.h
usr/include/glib-2.0/gio/gseekable.h
usr/include/glib-2.0/gio/gsettings.h
usr/include/glib-2.0/gio/gsettingsbackend.h
usr/include/glib-2.0/gio/gsettingsschema.h
usr/include/glib-2.0/gio/gsimpleaction.h
usr/include/glib-2.0/gio/gsimpleactiongroup.h
usr/include/glib-2.0/gio/gsimpleasyncresult.h
usr/include/glib-2.0/gio/gsimpleiostream.h
usr/include/glib-2.0/gio/gsimplepermission.h
usr/include/glib-2.0/gio/gsimpleproxyresolver.h
usr/include/glib-2.0/gio/gsocket.h
usr/include/glib-2.0/gio/gsocketaddress.h
usr/include/glib-2.0/gio/gsocketaddressenumerator.h
usr/include/glib-2.0/gio/gsocketclient.h
usr/include/glib-2.0/gio/gsocketconnectable.h
usr/include/glib-2.0/gio/gsocketconnection.h
usr/include/glib-2.0/gio/gsocketcontrolmessage.h
usr/include/glib-2.0/gio/gsocketlistener.h
usr/include/glib-2.0/gio/gsocketservice.h
usr/include/glib-2.0/gio/gsrvtarget.h
usr/include/glib-2.0/gio/gsubprocess.h
usr/include/glib-2.0/gio/gsubprocesslauncher.h
usr/include/glib-2.0/gio/gtask.h
usr/include/glib-2.0/gio/gtcpconnection.h
usr/include/glib-2.0/gio/gtcpwrapperconnection.h
usr/include/glib-2.0/gio/gtestdbus.h
usr/include/glib-2.0/gio/gthemedicon.h
usr/include/glib-2.0/gio/gthreadedsocketservice.h
usr/include/glib-2.0/gio/gtlsbackend.h
usr/include/glib-2.0/gio/gtlscertificate.h
usr/include/glib-2.0/gio/gtlsclientconnection.h
usr/include/glib-2.0/gio/gtlsconnection.h
usr/include/glib-2.0/gio/gtlsdatabase.h
usr/include/glib-2.0/gio/gtlsfiledatabase.h
usr/include/glib-2.0/gio/gtlsinteraction.h
usr/include/glib-2.0/gio/gtlspassword.h
usr/include/glib-2.0/gio/gtlsserverconnection.h
usr/include/glib-2.0/gio/gvfs.h
usr/include/glib-2.0/gio/gvolume.h
usr/include/glib-2.0/gio/gvolumemonitor.h
usr/include/glib-2.0/gio/gzlibcompressor.h
usr/include/glib-2.0/gio/gzlibdecompressor.h
usr/include/glib-2.0/glib-object.h
usr/include/glib-2.0/glib-unix.h
usr/include/glib-2.0/glib.h
usr/include/glib-2.0/glib/deprecated/gallocator.h
usr/include/glib-2.0/glib/deprecated/gcache.h
usr/include/glib-2.0/glib/deprecated/gcompletion.h
usr/include/glib-2.0/glib/deprecated/gmain.h
usr/include/glib-2.0/glib/deprecated/grel.h
usr/include/glib-2.0/glib/deprecated/gthread.h
usr/include/glib-2.0/glib/galloca.h
usr/include/glib-2.0/glib/garray.h
usr/include/glib-2.0/glib/gasyncqueue.h
usr/include/glib-2.0/glib/gatomic.h
usr/include/glib-2.0/glib/gbacktrace.h
usr/include/glib-2.0/glib/gbase64.h
usr/include/glib-2.0/glib/gbitlock.h
usr/include/glib-2.0/glib/gbookmarkfile.h
usr/include/glib-2.0/glib/gbytes.h
usr/include/glib-2.0/glib/gcharset.h
usr/include/glib-2.0/glib/gchecksum.h
usr/include/glib-2.0/glib/gconvert.h
usr/include/glib-2.0/glib/gdataset.h
usr/include/glib-2.0/glib/gdate.h
usr/include/glib-2.0/glib/gdatetime.h
usr/include/glib-2.0/glib/gdir.h
usr/include/glib-2.0/glib/genviron.h
usr/include/glib-2.0/glib/gerror.h
usr/include/glib-2.0/glib/gfileutils.h
usr/include/glib-2.0/glib/ggettext.h
usr/include/glib-2.0/glib/ghash.h
usr/include/glib-2.0/glib/ghmac.h
usr/include/glib-2.0/glib/ghook.h
usr/include/glib-2.0/glib/ghostutils.h
usr/include/glib-2.0/glib/gi18n-lib.h
usr/include/glib-2.0/glib/gi18n.h
usr/include/glib-2.0/glib/giochannel.h
usr/include/glib-2.0/glib/gkeyfile.h
usr/include/glib-2.0/glib/glib-autocleanups.h
usr/include/glib-2.0/glib/glist.h
usr/include/glib-2.0/glib/gmacros.h
usr/include/glib-2.0/glib/gmain.h
usr/include/glib-2.0/glib/gmappedfile.h
usr/include/glib-2.0/glib/gmarkup.h
usr/include/glib-2.0/glib/gmem.h
usr/include/glib-2.0/glib/gmessages.h
usr/include/glib-2.0/glib/gnode.h
usr/include/glib-2.0/glib/goption.h
usr/include/glib-2.0/glib/gpattern.h
usr/include/glib-2.0/glib/gpoll.h
usr/include/glib-2.0/glib/gprimes.h
usr/include/glib-2.0/glib/gprintf.h
usr/include/glib-2.0/glib/gqsort.h
usr/include/glib-2.0/glib/gquark.h
usr/include/glib-2.0/glib/gqueue.h
usr/include/glib-2.0/glib/grand.h
usr/include/glib-2.0/glib/gregex.h
usr/include/glib-2.0/glib/gscanner.h
usr/include/glib-2.0/glib/gsequence.h
usr/include/glib-2.0/glib/gshell.h
usr/include/glib-2.0/glib/gslice.h
usr/include/glib-2.0/glib/gslist.h
usr/include/glib-2.0/glib/gspawn.h
usr/include/glib-2.0/glib/gstdio.h
usr/include/glib-2.0/glib/gstrfuncs.h
usr/include/glib-2.0/glib/gstring.h
usr/include/glib-2.0/glib/gstringchunk.h
usr/include/glib-2.0/glib/gtestutils.h
usr/include/glib-2.0/glib/gthread.h
usr/include/glib-2.0/glib/gthreadpool.h
usr/include/glib-2.0/glib/gtimer.h
usr/include/glib-2.0/glib/gtimezone.h
usr/include/glib-2.0/glib/gtrashstack.h
usr/include/glib-2.0/glib/gtree.h
usr/include/glib-2.0/glib/gtypes.h
usr/include/glib-2.0/glib/gunicode.h
usr/include/glib-2.0/glib/gurifuncs.h
usr/include/glib-2.0/glib/gutils.h
usr/include/glib-2.0/glib/guuid.h
usr/include/glib-2.0/glib/gvariant.h
usr/include/glib-2.0/glib/gvarianttype.h
usr/include/glib-2.0/glib/gversion.h
usr/include/glib-2.0/glib/gversionmacros.h
usr/include/glib-2.0/glib/gwin32.h
usr/include/glib-2.0/gmodule.h
usr/include/glib-2.0/gobject/gbinding.h
usr/include/glib-2.0/gobject/gboxed.h
usr/include/glib-2.0/gobject/gclosure.h
usr/include/glib-2.0/gobject/genums.h
usr/include/glib-2.0/gobject/glib-types.h
usr/include/glib-2.0/gobject/gmarshal.h
usr/include/glib-2.0/gobject/gobject-autocleanups.h
usr/include/glib-2.0/gobject/gobject.h
usr/include/glib-2.0/gobject/gobjectnotifyqueue.c
usr/include/glib-2.0/gobject/gparam.h
usr/include/glib-2.0/gobject/gparamspecs.h
usr/include/glib-2.0/gobject/gsignal.h
usr/include/glib-2.0/gobject/gsourceclosure.h
usr/include/glib-2.0/gobject/gtype.h
usr/include/glib-2.0/gobject/gtypemodule.h
usr/include/glib-2.0/gobject/gtypeplugin.h
usr/include/glib-2.0/gobject/gvalue.h
usr/include/glib-2.0/gobject/gvaluearray.h
usr/include/glib-2.0/gobject/gvaluecollector.h
usr/include/glib-2.0/gobject/gvaluetypes.h
usr/lib/glib-2.0/include/glibconfig.h
usr/lib/libgio-2.0.so
usr/lib/libglib-2.0.so
usr/lib/libgmodule-2.0.so
usr/lib/libgobject-2.0.so
usr/lib/libgthread-2.0.so
usr/lib64/glib-2.0/include/glibconfig.h
usr/lib64/libgio-2.0.so
usr/lib64/libglib-2.0.so
usr/lib64/libgmodule-2.0.so
usr/lib64/libgobject-2.0.so
usr/lib64/libgthread-2.0.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment