# HG changeset patch # User Leonard Ritter # Date 1648922233 -7200 # Sat Apr 02 19:57:13 2022 +0200 # Node ID 6000e4e2a81305d1ec035e9d164d830975225e89 # Parent 58c91759f6c25691b133500b961b03e5a03c29b8 * updated dependencies to use eo diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -30,7 +30,7 @@ syntax: regexp -^cdefs +^attic ^build ^externals/archives ^externals/downloads @@ -39,3 +39,16 @@ ^dist ^llvm ^.vscode/ +^.eo/ +^include/SDL2/ +^include/bullet/ +^include/chipmunk/ +^include/imgui/ +^include/lmdb/ +^include/nfd/ +^include/nanovg/ +^include/ode/ +^include/portmidi/ +^include/blendish/ +^include/oui/ +^bin/genie diff --git a/__env.sc b/__env.sc --- a/__env.sc +++ b/__env.sc @@ -1,6 +1,8 @@ if console? print "console launched" +# uncomment to start off core module environment rather than the project one +#let __env = core-module-env 'bind-symbols __env module-search-path = cons diff --git a/build.sh b/build.sh new file mode 100755 --- /dev/null +++ b/build.sh @@ -0,0 +1,4 @@ +eo install -y all \ + && eo sync \ + && genie gmake \ + && make -C build config=release -j$(nproc) diff --git a/externals/build_blendish_oui.py b/externals/build_blendish_oui.py deleted file mode 100644 --- a/externals/build_blendish_oui.py +++ /dev/null @@ -1,41 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'blendish' - HG_URL = "https://bitbucket.org/duangle/oui-blendish" - # always use latest revision - - def run_any_build(self): - self.copy2(os.path.join(self.TARGETDIR, 'blendish.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'blendish.h'), - self.CDEFDIR) - self.copy2(os.path.join(self.TARGETDIR, 'oui.h'), - self.INCLUDEDIR) - - def run_linux2_build(self): - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - # not in use yet - return - result = self.cpp(""" - #define OUI_USE_UNION_VECTORS 0 - #include "blendish.h" - #include "oui.h" - #pragma MCPP put_defines - """) - result = self.filter_cdef_defines(result) - self.write_cdef(result) - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_bullet.py b/externals/build_bullet.py deleted file mode 100644 --- a/externals/build_bullet.py +++ /dev/null @@ -1,67 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'bullet' - GIT_URL = "https://github.com/bulletphysics/bullet3" - GIT_REVISION = "2.89" - GIT_ARCHIVE = "archive" - - def run_win32_build(self): - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_linux2_build(self): - builddir = os.path.join(self.TARGETDIR, "build_cmake") - self.makedirs(builddir) - self.chdir(builddir) - cmd = "cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=ON -DBT_USE_EGL=ON -DCMAKE_BUILD_TYPE=Release .." - self.shell(cmd) - self.shell("make -j8") - - version = "2.89" - basedir = "build_cmake" - libfiles = [ - ("Extras/BulletRobotics", "libBulletRobotics.so"), - ("Extras/InverseDynamics", "libBulletInverseDynamicsUtils.so"), - ("Extras/Serialize/BulletWorldImporter", "libBulletWorldImporter.so"), - ("Extras/Serialize/BulletFileLoader", "libBulletFileLoader.so"), - ("src/BulletSoftBody", "libBulletSoftBody.so"), - ("src/BulletDynamics", "libBulletDynamics.so"), - ("src/BulletCollision", "libBulletCollision.so"), - ("src/BulletInverseDynamics", "libBulletInverseDynamics.so"), - ("src/LinearMath", "libLinearMath.so"), - ("src/Bullet3Common", "libBullet3Common.so"), - ] - for libdir,targetname in libfiles: - targetname = targetname + "." + version - self.copy2(os.path.join(self.TARGETDIR, basedir, libdir, targetname), - os.path.join(self.BINDIR, targetname)) - - includesrcdir = os.path.join(self.TARGETDIR, 'examples', 'SharedMemory') - includedir = os.path.join(self.CDEFDIR, 'bullet') - self.rmtree(includedir) - self.makedirs(includedir) - headerfiles = [ - 'PhysicsClientC_API.h', - 'SharedMemoryPublic.h', - 'PhysicsClientSharedMemory_C_API.h', - 'PhysicsClientSharedMemory2_C_API.h', - 'PhysicsDirectC_API.h', - ] - for header in headerfiles: - self.copy2(os.path.join(includesrcdir, header), includedir) - self.run_any_build() - - def run_any_build(self): - pass - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_chipmunk.py b/externals/build_chipmunk.py deleted file mode 100644 --- a/externals/build_chipmunk.py +++ /dev/null @@ -1,39 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'chipmunk' - GIT_URL = "https://github.com/slembcke/Chipmunk2D" - GIT_REVISION = "87340c216bf97554dc552371bbdecf283f7c540e" - - def run_any_build(self): - includedir = os.path.join(self.CDEFDIR, 'chipmunk') - self.rmtree(includedir) - self.copytree(os.path.join(self.TARGETDIR, 'include', 'chipmunk'), - includedir) - - def run_linux2_build(self): - os.environ['CFLAGS'] = '-DCP_USE_DOUBLES=0' - self.shell("cmake .") - - #os.environ['CXXFLAGS'] = '-fPIC' - #os.environ['CPPFLAGS'] = '-fPIC' - self.shell('make -j 4') - self.copy2( - os.path.join(self.TARGETDIR, 'src', 'libchipmunk.so.7.0.3'), - os.path.join(self.BINDIR, 'libchipmunk.so')) - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_cimgui.py b/externals/build_cimgui.py deleted file mode 100644 --- a/externals/build_cimgui.py +++ /dev/null @@ -1,47 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'cimgui' - GIT_URL = "https://github.com/Extrawurst/cimgui" - # 1.53 - #GIT_REVISION = "1a5e261a8e97d58b32a474779774eca9314c10d0" - # 1.69 - #GIT_REVISION = "4be0522d9f1513e9f14dd3510c396325007f58ad" - # 1.75+ docking branch - #GIT_REVISION = "1d32b3804d834da4d05f02d6d81e2f6b4b94138e" - # jun 30, 2020, master - GIT_REVISION = "c1f0030b20488a940f0813f413d84313652bb0b2" - # april 7, 2021, master - #GIT_REVISION = "6a98f4bbedec967d02f3395f319feceec311ecb2" - - def run_any_build(self): - self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imgui.h'), - os.path.join(self.TARGETDIR, 'imgui')) - self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imgui_internal.h'), - os.path.join(self.TARGETDIR, 'imgui')) - self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imconfig.h'), - os.path.join(self.TARGETDIR, 'imgui')) - self.chdir(os.path.join(self.TARGETDIR, 'generator')) - self.shell("luajit ./generator.lua gcc") - self.copy2(os.path.join(self.TARGETDIR, 'generator', 'output', 'cimgui.h'), self.TARGETDIR) - self.copy2(os.path.join(self.TARGETDIR, 'generator', 'output', 'cimgui.cpp'), self.TARGETDIR) - self.copy2(os.path.join(self.TARGETDIR, 'cimgui.h'), - self.CDEFDIR) - - def run_linux2_build(self): - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_imgui.py b/externals/build_imgui.py deleted file mode 100644 --- a/externals/build_imgui.py +++ /dev/null @@ -1,51 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'imgui' - GIT_URL = "https://github.com/ocornut/imgui" - # 1.53 - #GIT_REVISION = "e916310b2e1f9cacbb2b9ce192a3dfb359e4b509" - # 1.69 - #GIT_REVISION = "ebe79bbed00a13fd4455f04131b63d49c28ebd5d" - # 1.75+ docking branch - #GIT_REVISION = "103c5edaaa832ccded2523ea328dc4398ba7b456" - # 1.77+ docking branch - #GIT_REVISION = "4f5aac319e3561284833db90f35d218de8b282c1" - # 1.80+ docking branch - GIT_REVISION = "80b5fb51edba2fd3dea76ec3e88153e2492243d1" - - def run_any_build(self): - self.copy2(os.path.join(self.TARGETDIR, 'imgui.h'), - self.CDEFDIR) - - def run_linux2_build(self): - """ - cmd = 'premake4 gmake' - self.shell(cmd) - - os.chdir(os.path.join(self.TARGETDIR, 'build')) - self.shell("make clean") - - os.environ['CFLAGS'] = '-fPIC' - os.environ['CXXFLAGS'] = '-fPIC' - os.environ['CPPFLAGS'] = '-fPIC' - cmd = 'make -j 4 nanovg config=release' - self.shell(cmd) - self.run_any_build() - """ - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_lmdb.py b/externals/build_lmdb.py deleted file mode 100644 --- a/externals/build_lmdb.py +++ /dev/null @@ -1,34 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'lmdb' - GIT_URL = "https://github.com/LMDB/lmdb" - # aug 26, 2019 - GIT_REVISION = "5c012bbe033f9bbb273078b07dded59f080d348d" - - def run_any_build(self): - pass - - def run_linux2_build(self): - srcdir = os.path.join(self.TARGETDIR, 'libraries', 'liblmdb') - os.chdir(srcdir) - self.shell("make -j4") - self.copy2(os.path.join(srcdir, 'liblmdb.so'), self.BINDIR) - self.copy2(os.path.join(srcdir, 'lmdb.h'), self.CDEFDIR) - self.copy2(os.path.join(srcdir, 'midl.h'), self.CDEFDIR) - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_nanovg.py b/externals/build_nanovg.py deleted file mode 100644 --- a/externals/build_nanovg.py +++ /dev/null @@ -1,84 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'nanovg' - GIT_URL = "https://github.com/memononen/nanovg" - # oct 25, 2015 - GIT_REVISION = "cb6fd9100d1f316fc14a5b49df40d3defefd799d" - # dec 25, 2020 - GIT_REVISION = "077b65e0cf3e22ee4f588783e319b19b0a608065" - - def run_any_build(self): - self.copy2(os.path.join(self.TARGETDIR, 'src', 'nanovg.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'nanovg_gl.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'nanovg_gl_utils.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'stb_image.h'), - self.INCLUDEDIR) - - self.copy2(os.path.join(self.TARGETDIR, 'src', 'nanovg.h'), - self.CDEFDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'nanovg_gl.h'), - self.CDEFDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'stb_image.h'), - self.CDEFDIR) - - def run_linux2_build(self): - cmd = 'genie gmake' - self.shell(cmd) - - builddir = os.path.join(self.TARGETDIR, 'build') - os.chdir(builddir) - self.shell("make clean") - - os.environ['CFLAGS'] = '-fPIC' - os.environ['CXXFLAGS'] = '-fPIC' - os.environ['CPPFLAGS'] = '-fPIC' - cmd = 'make -j 4 nanovg config=release TARGETDIR=' + builddir - self.shell(cmd) - self.run_any_build() - - def run_darwin_build(self): - cmd = 'genie gmake' - self.shell(cmd) - - builddir = os.path.join(self.TARGETDIR, 'build') - os.chdir(builddir) - self.shell("make clean") - - os.environ['CFLAGS'] = '-fPIC' - os.environ['CXXFLAGS'] = '-fPIC' - os.environ['CPPFLAGS'] = '-fPIC' - cmd = 'make -j 4 nanovg config=release TARGETDIR=' + builddir - self.shell(cmd) - self.run_any_build() - - def run_win32_build(self): - cmd = 'genie gmake' - self.shell(cmd) - - builddir = os.path.join(self.TARGETDIR, 'build') - os.chdir(builddir) - self.shell("make clean") - - cmd = 'make -j 4 nanovg config=release TARGETDIR=' + builddir - self.shell(cmd) - self.run_any_build() - - def gen_cdef(self): - # not in use yet - return - result = self.cpp(""" - #include "nanovg.h" - #pragma MCPP put_defines - """) - result = self.filter_cdef_defines(result) - self.write_cdef(result) - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_nativefiledialog.py b/externals/build_nativefiledialog.py deleted file mode 100644 --- a/externals/build_nativefiledialog.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'nativefiledialog' - - GIT_URL = "https://github.com/mlabbe/nativefiledialog" - #GIT_REVISION = "45c2a71a1113e135fdc52c9d0e8f92080546cf2a" - #GIT_REVISION = "5cfe5002eb0fac1e49777a17dec70134147931e2" - # sep 30, 2019 - GIT_REVISION = "67345b80ebb429ecc2aeda94c478b3bcc5f7888e" - - - def run_win32_build(self): - self.chdir(self.TARGETDIR) - cmd = 'make -C build/gmake_windows config=release_x64' - self.shell(cmd) - - self.copy2(os.path.join(self.TARGETDIR, 'src', 'include', 'nfd.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'include', 'nfd.h'), - self.CDEFDIR) - - def run_linux2_build(self): - #os.environ['CFLAGS'] = '-fPIC' - self.copy2(os.path.join(self.EXTERNALDIR, 'nativefiledialog', 'SConstruct'), - os.path.join(self.TARGETDIR, 'src')) - self.chdir(os.path.join(self.TARGETDIR, 'src')) - cmd = 'scons' - self.shell(cmd) - - self.copy2(os.path.join(self.TARGETDIR, 'src', 'include', 'nfd.h'), - self.INCLUDEDIR) - self.copy2(os.path.join(self.TARGETDIR, 'src', 'include', 'nfd.h'), - self.CDEFDIR) - - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_ode.py b/externals/build_ode.py deleted file mode 100644 --- a/externals/build_ode.py +++ /dev/null @@ -1,103 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'ode' - SVN_URL = "svn://svn.code.sf.net/p/opende/code/trunk" - SVN_REVISION = "1970" - - def run_win32_build(self): - cwd = os.getcwd() - builddir = os.path.join(self.TARGETDIR, 'build') - os.chdir(builddir) - premakearch = 'x64' if self.IS_X64 else 'x32' - self.shell('premake4 --platform={} vs2008'.format(premakearch)) - os.chdir(cwd) - slnfile = os.path.join(builddir, 'vs2008', 'ode.sln') - - archstr = ' /p:Platform=x64' if self.IS_X64 else '' - target = ' /p:Configuration=ReleaseSingleDLL' - useenv = ' /p:"VCBuildAdditionalOptions= /useenv"' - cmd = 'msbuild {} /nologo{}{}{}'.format(slnfile, useenv, target, archstr) - self.shell(cmd) - - self.copy2(os.path.join(self.TARGETDIR, 'lib', - 'ReleaseSingleDLL', 'ode_single.dll'), - os.path.join(self.BINDIR, 'ode.dll')) - includedir = os.path.join(self.INCLUDEDIR, 'ode') - self.rmtree(includedir) - self.copytree(os.path.join(self.TARGETDIR, 'include', 'ode'), - includedir) - - def run_darwin_build(self): - PATCH_ODE_OSX = os.path.join(self.EXTERNALDIR, self.NAME, 'ode_osx_bootstrap.patch') - self.apply_patch(PATCH_ODE_OSX) - - cmd = './bootstrap' - self.shell(cmd) - - cmd = './configure --with-pic --prefix {0}'.format(self.TARGETDIR) - self.shell(cmd) - - cmd = 'make -j 4' - self.shell(cmd) - - cmd = 'make install' - self.shell(cmd) - - self.copy2(os.path.join(self.TARGETDIR, 'lib', - 'libode.a'), - os.path.join(self.BINDIR, 'libode.a')) - includedir = os.path.join(self.INCLUDEDIR, 'ode') - self.rmtree(includedir) - self.copytree(os.path.join(self.TARGETDIR, 'include', 'ode'), - includedir) - - def run_linux2_build(self): - os.chdir(os.path.join(self.TARGETDIR, 'build')) - - cmd = 'premake4 gmake' - self.shell(cmd) - - os.chdir(os.path.join(self.TARGETDIR, 'build', 'gmake')) - - if 1: - cmd = 'make -j 4 config=releasesingledll' - self.shell(cmd) - - # copy over - self.copy2(os.path.join(self.TARGETDIR, 'lib', - 'ReleaseSingleDLL', 'libode_single.so'), - os.path.join(self.BINDIR, 'libode.so')) - else: - cmd = 'make -j 4 config=releasedoubledll' - self.shell(cmd) - - # copy over - self.copy2(os.path.join(self.TARGETDIR, 'lib', - 'ReleaseDoubleDLL', 'libode_double.so'), - os.path.join(self.BINDIR, 'libode.so')) - #includedir = os.path.join(self.INCLUDEDIR, 'ode') - includedir = os.path.join(self.CDEFDIR, 'ode') - self.rmtree(includedir) - self.copytree(os.path.join(self.TARGETDIR, 'include', 'ode'), - includedir) - - def gen_cdef(self): - result = self.cpp(""" - //#define dSINGLE - #define FILE void - #define time_t int64_t - - #include "ode/ode.h" - #pragma MCPP put_defines - """) - result = self.filter_cdef_defines(result, blacklist=[ - 'X86_64_SYSTEM', - ]) - self.write_cdef(result) - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_portmidi.py b/externals/build_portmidi.py deleted file mode 100644 --- a/externals/build_portmidi.py +++ /dev/null @@ -1,46 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'portmidi' - HG_URL = "https://bitbucket.org/duangle/portmidi" - # GIT_REVISION = "7fced5def3b44145369bc1bef3311d6dedf98747" - - def run_any_build(self): - # copy include files - self.copy2( - os.path.join(self.TARGETDIR, 'pm_common', 'portmidi.h'), - self.CDEFDIR) - self.copy2( - os.path.join(self.TARGETDIR, 'porttime', 'porttime.h'), - self.CDEFDIR) - - def run_linux2_build(self): - builddir = os.path.join(self.TARGETDIR, 'build') - os.makedirs(builddir) - os.chdir(builddir) - cmd = 'cmake -DCMAKE_INSTALL_PREFIX:PATH={builddir} -DINSTALL_NAME_DIR={builddir} ..'.format( - builddir = self.BUILDDIR) - self.shell(cmd) - - cmd = 'make -j 4' - self.shell(cmd) - - self.copy2( - os.path.join(self.TARGETDIR, 'build', 'pm_dylib', 'libportmidi.so'), - self.BINDIR) - self.run_any_build() - - def run_darwin_build(self): - self.run_any_build() - - def run_win32_build(self): - self.run_any_build() - - def gen_cdef(self): - pass - -if __name__ == '__main__': - Builder().run() diff --git a/externals/build_sdl2.py b/externals/build_sdl2.py deleted file mode 100644 --- a/externals/build_sdl2.py +++ /dev/null @@ -1,116 +0,0 @@ -# SDL downloader & builder - -import os -from build_common import BuilderBase - -class Builder(BuilderBase): - NAME = 'SDL2' - if BuilderBase.IS_WIN32: - URL = "http://libsdl.org/release/" - ARCHIVE = "SDL2-devel-2.0.10-mingw.tar.gz" - else: - HG_URL = "http://hg.libsdl.org/SDL" - #HG_REVISION = "a0d15db7bd09" - #HG_REVISION = "235c5929651c" - HG_REVISION = "bc90ce38f1e2" # 2.0.10 - HG_ARCHIVE = "archive" - - def run_linux2_build(self): - os.chdir(self.TARGETDIR) - builddir = os.path.join(self.TARGETDIR, 'build') - self.makedirs(builddir) - - os.environ['CFLAGS'] = '-fPIC' - os.environ['CXXFLAGS'] = '-fPIC' - os.chdir(builddir) - cmd = '../configure --with-pic --enable-video-vulkan --enable-video-opengl --disable-video-wayland --prefix {0}'.format(self.BUILDDIR) - self.shell(cmd) - - cmd = 'make -j 4' - self.shell(cmd) - - cmd = 'make install' - self.shell(cmd) - - # copy over - self.copy2(os.path.join(self.LIBDIR, 'libSDL2-2.0.so.0.10.0'), - os.path.join(self.BINDIR, 'libSDL2-2.0.so.0')) - # copy include files - includedir = os.path.join(self.CDEFDIR, 'SDL2') - self.rmtree(includedir) - self.copytree( - os.path.join(self.TARGETDIR, 'include'), - includedir) - - def run_darwin_build(self): - PATCH_SDL_OSX_GL32 = os.path.join(self.EXTERNALDIR, 'sdl-osx-gl3.2.patch') - self.apply_patch(PATCH_SDL_OSX_GL32) - builddir = os.path.join(self.TARGETDIR, 'build') - self.makedirs(builddir) - - os.environ['CFLAGS'] = '-fPIC' - os.environ['CXXFLAGS'] = '-fPIC' - os.chdir(builddir) - cmd = '../configure --with-pic --prefix {0}'.format(self.BUILDDIR) - self.shell(cmd) - - cmd = 'make -j 4' - self.shell(cmd) - - cmd = 'make install' - self.shell(cmd) - - # copy over - self.copy2(os.path.join(self.LIBDIR, 'libSDL2-2.0.0.dylib'), - os.path.join(self.BINDIR, 'libSDL2.dylib')) - - def run_win32_build(self): - srcdir = os.path.join(self.TARGETDIR, 'x86_64-w64-mingw32') - includedir = os.path.join(self.CDEFDIR, 'SDL2') - self.rmtree(includedir) - self.copytree(os.path.join(srcdir, 'include', 'SDL2'), includedir) - includedir = os.path.join(self.INCLUDEDIR, 'SDL2') - self.rmtree(includedir) - self.copytree(os.path.join(srcdir, 'include', 'SDL2'), includedir) - libdir = os.path.join(srcdir, 'lib') - self.copy2(os.path.join(libdir, 'libSDL2.a'), self.LIBDIR) - self.copy2(os.path.join(libdir, 'libSDL2.dll.a'), self.LIBDIR) - self.copy2(os.path.join(libdir, 'libSDL2.la'), self.LIBDIR) - self.copy2(os.path.join(libdir, 'libSDL2main.a'), self.LIBDIR) - self.copy2(os.path.join(libdir, 'libSDL2main.la'), self.LIBDIR) - self.copy2(os.path.join(srcdir, 'bin', 'SDL2.dll'), self.BINDIR) - - def run_win32_build_vs(self): - """not in use - just for future reference""" - if self.IS_X64: - builddir = os.path.join(self.TARGETDIR, 'VisualC', 'SDL', 'x64', 'Release') - else: - builddir = os.path.join(self.TARGETDIR, 'VisualC', 'SDL', 'Release') - slnfile = os.path.join(self.TARGETDIR, 'VisualC', 'SDL_VS2008.sln') - - DXSDK_DIR = os.environ['DXSDK_DIR'] - - os.environ['INCLUDE'] = os.path.join(DXSDK_DIR, 'Include') + os.pathsep + os.environ.get('INCLUDE', '') - DX_ARCH = 'x64' if self.IS_X64 else 'x86' - os.environ['LIB'] = os.path.join(DXSDK_DIR, 'Lib', DX_ARCH) + os.pathsep + os.environ.get('LIB', '') - - archstr = ' /p:Platform=x64' if self.IS_X64 else '' - useenv = ' /p:"VCBuildAdditionalOptions= /useenv"' - cmd = 'msbuild {} /nologo /p:Configuration=Release{}{}'.format( - slnfile, archstr, useenv) - self.shell(cmd) - assert os.path.isdir(builddir) - includedir = os.path.join(self.INCLUDEDIR, 'SDL2') - self.rmtree(includedir) - self.copytree( - os.path.join(self.TARGETDIR, 'include'), - includedir) - self.copy2( - os.path.join(builddir, 'SDL2.lib'), - self.LIBDIR) - self.copy2( - os.path.join(builddir, 'SDL2.dll'), - self.BINDIR) - -if __name__ == '__main__': - Builder().run() diff --git a/externals/nativefiledialog/SConstruct b/externals/nativefiledialog/SConstruct deleted file mode 100644 --- a/externals/nativefiledialog/SConstruct +++ /dev/null @@ -1,74 +0,0 @@ -# -# Native File Dialog -# -# Scons build script -- GCC, Clang, Visual Studio -# Does not build test - - -# target arch is build arch -- extend here for cross compiling -target_arch=str(Platform()) -debug = int(ARGUMENTS.get( 'debug', 0 )) - -nfd_files = ['nfd_common.c'] - -nfd_env = Environment() - -# Windows runtime library types -win_rtl = {'debug': '/MDd', - 'release': '/MD'} - -def set_debug(env): - if target_arch == 'win32': - env.Append( CCFLAGS=['/Z7', # obj contains full symbols - win_rtl['debug'] - ]) - else: - env.Append( CFLAGS=['-g'] ) - - -def set_release(env): - if target_arch == 'win32': - env.Append( CCFLAGS=[win_rtl['release'], - '/O2'] ) - else: - env.Append( CFLAGS=['-O3','-fPIC'] ) - - -def set_warnings(env): - if target_arch == 'win32': - env.Append( CCFLAGS=['/W3'], - CPPDEFINES=['_CRT_SECURE_NO_WARNINGS'] ) - else: - env.Append( CFLAGS=['-Wall', '-pedantic'] ) - - -def get_lib_name(base, is_debug): - if is_debug: - return base + '_d' - else: - return base - - -# Cocoa OS X builds - clang -if target_arch == 'darwin': - nfd_files.append('nfd_cocoa.m') - nfd_env.CC='clang -fcolor-diagnostics' - -# Linux GTK+ 3 builds - GCC -elif target_arch == 'posix': - nfd_files.append('nfd_gtk.c') - nfd_env.ParseConfig( 'pkg-config --cflags gtk+-3.0' ) - -# Windows builds - Visual Studio -elif target_arch == 'win32': - nfd_files.append('nfd_win.cpp') - -if debug: - set_debug(nfd_env) -else: - set_release(nfd_env) - -set_warnings(nfd_env) - -nfd_env.Append( CPPPATH=['.','./include'] ) -nfd_env.StaticLibrary( get_lib_name('nfd', debug), nfd_files ) diff --git a/genie.lua b/genie.lua --- a/genie.lua +++ b/genie.lua @@ -73,11 +73,11 @@ --"src/coro/*.c", - "build/src/imgui/imgui.cpp", - "build/src/imgui/imgui_draw.cpp", - "build/src/imgui/imgui_demo.cpp", - "build/src/imgui/imgui_tables.cpp", - "build/src/imgui/imgui_widgets.cpp", + "build/src/cimgui/imgui/imgui.cpp", + "build/src/cimgui/imgui/imgui_draw.cpp", + "build/src/cimgui/imgui/imgui_demo.cpp", + "build/src/cimgui/imgui/imgui_tables.cpp", + "build/src/cimgui/imgui/imgui_widgets.cpp", "build/src/cimgui/*.cpp", } @@ -86,12 +86,19 @@ "include/libbf", "include/glad", "build/include", - "build/include/SDL2", + "include/SDL2", + "include/nanovg", + "include/nanovg", + "include/blendish", + "include/oui", + "include/nfd", + "include/imgui", "src", - "build/src/imgui", + "build/src/cimgui/imgui", } libdirs { "lib", + "build/lib", "build/src/nanovg/build", "build/src/tess2/Build", } @@ -126,7 +133,7 @@ links { "pthread", "nanovg", - "tess2", + --"tess2", "gtk-3", -- for nativefiledialog } linkoptions { diff --git a/lib/tukan/imgui/cimgui.sc b/lib/tukan/imgui/cimgui.sc --- a/lib/tukan/imgui/cimgui.sc +++ b/lib/tukan/imgui/cimgui.sc @@ -9,7 +9,7 @@ """" //#include "imgui.h" #define CIMGUI_DEFINE_ENUMS_AND_STRUCTS - #include "cimgui.h" + #include "imgui/cimgui.h" #define IMGUI_IMPL_API #define LM_EXPORT #include "tukan/imgui_impl_opengl3.h" diff --git a/recipes/all.eo b/recipes/all.eo new file mode 100644 --- /dev/null +++ b/recipes/all.eo @@ -0,0 +1,17 @@ +# a meta-recipe that installs all the other ones +package all + summary "all project dependencies" + version "3" + depends + bullet + chipmunk2d + imgui + lmdb + nanovg + nfd + ode + portmidi + sdl2 + blendish + oui + genie diff --git a/recipes/blendish_oui.eo b/recipes/blendish_oui.eo new file mode 100644 --- /dev/null +++ b/recipes/blendish_oui.eo @@ -0,0 +1,14 @@ +revision := "e48d5d4ce16e" +archive := + download "https://hg.sr.ht/~duangle/oui-blendish/archive/{revision}.tar.gz" +base-dir := (commonpath (extract archive)) +package blendish + summary "Blendish" + version revision + + in "/include/blendish" "{base-dir}/blendish.h" +package oui + summary "OUI" + version revision + + in "/include/oui" "{base-dir}/oui.h" diff --git a/recipes/bullet.eo b/recipes/bullet.eo new file mode 100644 --- /dev/null +++ b/recipes/bullet.eo @@ -0,0 +1,36 @@ +version := "2.89" +archive := + download + "https://github.com/bulletphysics/bullet3/archive/refs/tags/{version}.tar.gz" +build-path := (commonpath (extract archive)) +base-dir := (mkdir "{build-path}/build_cmake") +build-command := + shell base-dir (dict) +base-dir := + then + build-command "cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=ON \ + -DBT_USE_EGL=ON -DCMAKE_BUILD_TYPE=Release .." + build-command "make -j {cpu-core-count}" + base-dir +include-src-dir := "{build-path}/examples/SharedMemory" +package bullet + summary "Bullet Physics SDK (C API)" + platform linux unknown + version version + alias "/lib/libBulletRobotics.so" "{base-dir}/Extras/BulletRobotics/libBulletRobotics.so.{version}" + alias "/lib/libBulletInverseDynamicsUtils.so" "{base-dir}/Extras/InverseDynamics/libBulletInverseDynamicsUtils.so.{version}" + alias "/lib/libBulletWorldImporter.so" "{base-dir}/Extras/Serialize/BulletWorldImporter/libBulletWorldImporter.so.{version}" + alias "/lib/libBulletFileLoader.so" "{base-dir}/Extras/Serialize/BulletFileLoader/libBulletFileLoader.so.{version}" + alias "/lib/libBulletSoftBody.so" "{base-dir}/src/BulletSoftBody/libBulletSoftBody.so.{version}" + alias "/lib/libBulletDynamics.so" "{base-dir}/src/BulletDynamics/libBulletDynamics.so.{version}" + alias "/lib/libBulletCollision.so" "{base-dir}/src/BulletCollision/libBulletCollision.so.{version}" + alias "/lib/libBulletInverseDynamics.so" "{base-dir}/src/BulletInverseDynamics/libBulletInverseDynamics.so.{version}" + alias "/lib/libLinearMath.so" "{base-dir}/src/LinearMath/libLinearMath.so.{version}" + alias "/lib/libBullet3Common.so" "{base-dir}/src/Bullet3Common/libBullet3Common.so.{version}" + + in "/include/bullet" + "{include-src-dir}/PhysicsClientC_API.h" + "{include-src-dir}/SharedMemoryPublic.h" + "{include-src-dir}/PhysicsClientSharedMemory_C_API.h" + "{include-src-dir}/PhysicsClientSharedMemory2_C_API.h" + "{include-src-dir}/PhysicsDirectC_API.h" diff --git a/recipes/chipmunk2d.eo b/recipes/chipmunk2d.eo new file mode 100644 --- /dev/null +++ b/recipes/chipmunk2d.eo @@ -0,0 +1,22 @@ +revision := "87340c216bf97554dc552371bbdecf283f7c540e" +archive := + download "https://github.com/slembcke/Chipmunk2D/archive/{revision}.tar.gz" +build-path := (commonpath (extract archive)) +base-dir := build-path +cmd := + shell base-dir + dict + CFLAGS = "-DCP_USE_DOUBLES=0" +base-dir := + then + cmd "cmake ." + cmd "make -j {cpu-core-count}" + base-dir +package chipmunk2d + summary "Chipmunk2D Game Dynamics" + platform linux unknown + version revision + + alias "/lib/libchipmunk.so" "{base-dir}/src/libchipmunk.so.7.0.3" + + in "/include" "{base-dir}/include/chipmunk" diff --git a/recipes/genie.eo b/recipes/genie.eo new file mode 100644 --- /dev/null +++ b/recipes/genie.eo @@ -0,0 +1,23 @@ +VERSION := "1160" +SUMMARY := "GENie - Project generator tool" +package genie + summary SUMMARY + version VERSION + platform linux unknown + + url := "https://github.com/bkaradzic/bx/raw/master/tools/bin/linux/genie" + binary := (download url) + binary := + then + cmd := (shell "." (dict)) + cmd "chmod a+x {binary}" + binary + alias "/bin/genie" binary +package genie + summary SUMMARY + version VERSION + platform windows windows-mingw + + url := "https://github.com/bkaradzic/bx/raw/master/tools/bin/windows/genie.exe" + binary := (download url) + alias "/bin/genie.exe" binary diff --git a/recipes/imgui.eo b/recipes/imgui.eo new file mode 100644 --- /dev/null +++ b/recipes/imgui.eo @@ -0,0 +1,50 @@ +imgui-revision := + # 1.53 + #"e916310b2e1f9cacbb2b9ce192a3dfb359e4b509" + # 1.69 + #"ebe79bbed00a13fd4455f04131b63d49c28ebd5d" + # 1.75+ docking branch + #"103c5edaaa832ccded2523ea328dc4398ba7b456" + # 1.77+ docking branch + #"4f5aac319e3561284833db90f35d218de8b282c1" + # 1.80+ docking branch + "80b5fb51edba2fd3dea76ec3e88153e2492243d1" +cimgui-revision := + # 1.53 + #"1a5e261a8e97d58b32a474779774eca9314c10d0" + # 1.69 + #"4be0522d9f1513e9f14dd3510c396325007f58ad" + # 1.75+ docking branch + #"1d32b3804d834da4d05f02d6d81e2f6b4b94138e" + # jun 30, 2020, master + "c1f0030b20488a940f0813f413d84313652bb0b2" + # april 7, 2021, master + #"6a98f4bbedec967d02f3395f319feceec311ecb2" +imgui-archive := + download "https://github.com/ocornut/imgui/archive/{imgui-revision}.tar.gz" +imgui-build-path := (commonpath (extract imgui-archive)) +cimgui-archive := + download "https://github.com/Extrawurst/cimgui/archive/{cimgui-revision}.tar.gz" +cimgui-build-path := (commonpath (extract cimgui-archive)) +cmd := (shell cimgui-build-path (dict)) +imgui-subdir := "{cimgui-build-path}/imgui" +gen-cmd := (shell "{cimgui-build-path}/generator" (dict)) +cimgui-build-path := + then + cmd "cp {imgui-build-path}/imgui.h {imgui-subdir}/" + cmd "cp {imgui-build-path}/imgui_internal.h {imgui-subdir}/" + cmd "cp {imgui-build-path}/imconfig.h {imgui-subdir}/" + gen-cmd "luajit ./generator.lua gcc" + cimgui-build-path +package imgui + summary "Dear ImGui Sources (+ C API)" + platform linux unknown + version imgui-revision + + in "/include/imgui" + "{cimgui-build-path}/generator/output/cimgui.h" + in "/build/src/cimgui" + "{cimgui-build-path}/generator/output/cimgui.cpp" + alias "/build/src/cimgui/imgui" imgui-build-path + + diff --git a/externals/include/GL/gl.h b/recipes/include/GL/gl.h rename from externals/include/GL/gl.h rename to recipes/include/GL/gl.h diff --git a/externals/include/GL/glu.h b/recipes/include/GL/glu.h rename from externals/include/GL/glu.h rename to recipes/include/GL/glu.h diff --git a/externals/include/GL/glx.h b/recipes/include/GL/glx.h rename from externals/include/GL/glx.h rename to recipes/include/GL/glx.h diff --git a/externals/include/OpenGL/OpenGL.h b/recipes/include/OpenGL/OpenGL.h rename from externals/include/OpenGL/OpenGL.h rename to recipes/include/OpenGL/OpenGL.h diff --git a/externals/include/Windows.h b/recipes/include/Windows.h rename from externals/include/Windows.h rename to recipes/include/Windows.h diff --git a/externals/include/X11/Xatom.h b/recipes/include/X11/Xatom.h rename from externals/include/X11/Xatom.h rename to recipes/include/X11/Xatom.h diff --git a/externals/include/X11/Xlib.h b/recipes/include/X11/Xlib.h rename from externals/include/X11/Xlib.h rename to recipes/include/X11/Xlib.h diff --git a/externals/include/alloca.h b/recipes/include/alloca.h rename from externals/include/alloca.h rename to recipes/include/alloca.h diff --git a/externals/include/float.h b/recipes/include/float.h rename from externals/include/float.h rename to recipes/include/float.h diff --git a/externals/include/iconv.h b/recipes/include/iconv.h rename from externals/include/iconv.h rename to recipes/include/iconv.h diff --git a/externals/include/inttypes.h b/recipes/include/inttypes.h rename from externals/include/inttypes.h rename to recipes/include/inttypes.h diff --git a/externals/include/limits.h b/recipes/include/limits.h rename from externals/include/limits.h rename to recipes/include/limits.h diff --git a/externals/include/malloc.h b/recipes/include/malloc.h rename from externals/include/malloc.h rename to recipes/include/malloc.h diff --git a/externals/include/math.h b/recipes/include/math.h rename from externals/include/math.h rename to recipes/include/math.h diff --git a/externals/include/pthread.h b/recipes/include/pthread.h rename from externals/include/pthread.h rename to recipes/include/pthread.h diff --git a/externals/include/setjmp.h b/recipes/include/setjmp.h rename from externals/include/setjmp.h rename to recipes/include/setjmp.h diff --git a/externals/include/stdarg.h b/recipes/include/stdarg.h rename from externals/include/stdarg.h rename to recipes/include/stdarg.h diff --git a/externals/include/stdbool.h b/recipes/include/stdbool.h rename from externals/include/stdbool.h rename to recipes/include/stdbool.h diff --git a/externals/include/stddef.h b/recipes/include/stddef.h rename from externals/include/stddef.h rename to recipes/include/stddef.h diff --git a/externals/include/stdint.h b/recipes/include/stdint.h rename from externals/include/stdint.h rename to recipes/include/stdint.h diff --git a/externals/include/stdio.h b/recipes/include/stdio.h rename from externals/include/stdio.h rename to recipes/include/stdio.h diff --git a/externals/include/stdlib.h b/recipes/include/stdlib.h rename from externals/include/stdlib.h rename to recipes/include/stdlib.h diff --git a/externals/include/string.h b/recipes/include/string.h rename from externals/include/string.h rename to recipes/include/string.h diff --git a/externals/include/sys/types.h b/recipes/include/sys/types.h rename from externals/include/sys/types.h rename to recipes/include/sys/types.h diff --git a/externals/include/time.h b/recipes/include/time.h rename from externals/include/time.h rename to recipes/include/time.h diff --git a/externals/include/ucontext.h b/recipes/include/ucontext.h rename from externals/include/ucontext.h rename to recipes/include/ucontext.h diff --git a/externals/include/unistd.h b/recipes/include/unistd.h rename from externals/include/unistd.h rename to recipes/include/unistd.h diff --git a/recipes/lmdb.eo b/recipes/lmdb.eo new file mode 100644 --- /dev/null +++ b/recipes/lmdb.eo @@ -0,0 +1,22 @@ +revision := + # aug 26, 2019 + "5c012bbe033f9bbb273078b07dded59f080d348d" +archive := + download "https://github.com/LMDB/lmdb/archive/{revision}.tar.gz" +build-path := (commonpath (extract archive)) +base-dir := "{build-path}/libraries/liblmdb" +cmd := + shell base-dir (dict) +base-dir := + then + cmd "make -j {cpu-core-count}" + base-dir +package lmdb + summary "Lightning Memory-Mapped Database" + platform linux unknown + version revision + + in "/lib" "{base-dir}/liblmdb.so" + in "/include/lmdb" + "{base-dir}/lmdb.h" + "{base-dir}/midl.h" diff --git a/recipes/nanovg.eo b/recipes/nanovg.eo new file mode 100644 --- /dev/null +++ b/recipes/nanovg.eo @@ -0,0 +1,32 @@ +revision := + # oct 25, 2015 + #"cb6fd9100d1f316fc14a5b49df40d3defefd799d" + # dec 25, 2020 + "077b65e0cf3e22ee4f588783e319b19b0a608065" +archive := + download "https://github.com/memononen/nanovg/archive/{revision}.tar.gz" +build-path := (commonpath (extract archive)) +cmd := (shell build-path (dict)) +base-dir := "{build-path}/build" +build-cmd := + shell base-dir + dict + CFLAGS = "-fPIC" + CXXFLAGS = "-fPIC" + CPPFLAGS = "-fPIC" +base-dir := + then + cmd "genie gmake" + build-cmd "make -j {cpu-core-count} nanovg config=release TARGETDIR={base-dir}" + base-dir +package nanovg + summary "NanoVG (Static)" + platform linux unknown + version revision + + in "/build/lib" "{base-dir}/libnanovg.a" + in "/include/nanovg" + "{build-path}/src/nanovg.h" + "{build-path}/src/nanovg_gl.h" + "{build-path}/src/nanovg_gl_utils.h" + "{build-path}/src/stb_image.h" diff --git a/recipes/nativefiledialog.eo b/recipes/nativefiledialog.eo new file mode 100644 --- /dev/null +++ b/recipes/nativefiledialog.eo @@ -0,0 +1,112 @@ +revision := + #"45c2a71a1113e135fdc52c9d0e8f92080546cf2a" + #"5cfe5002eb0fac1e49777a17dec70134147931e2" + # sep 30, 2019 + "67345b80ebb429ecc2aeda94c478b3bcc5f7888e" +archive := + download "https://github.com/mlabbe/nativefiledialog/archive/{revision}.tar.gz" +build-path := (commonpath (extract archive)) +base-dir := build-path +SConstruct := + """"# + # Native File Dialog + # + # Scons build script -- GCC, Clang, Visual Studio + # Does not build test + + # target arch is build arch -- extend here for cross compiling + target_arch=str(Platform()) + debug = int(ARGUMENTS.get( 'debug', 0 )) + + nfd_files = ['nfd_common.c'] + + nfd_env = Environment() + + # Windows runtime library types + win_rtl = {'debug': '/MDd', + 'release': '/MD'} + + def set_debug(env): + if target_arch == 'win32': + env.Append( CCFLAGS=['/Z7', # obj contains full symbols + win_rtl['debug'] + ]) + else: + env.Append( CFLAGS=['-g'] ) + + + def set_release(env): + if target_arch == 'win32': + env.Append( CCFLAGS=[win_rtl['release'], + '/O2'] ) + else: + env.Append( CFLAGS=['-O3','-fPIC'] ) + + + def set_warnings(env): + if target_arch == 'win32': + env.Append( CCFLAGS=['/W3'], + CPPDEFINES=['_CRT_SECURE_NO_WARNINGS'] ) + else: + env.Append( CFLAGS=['-Wall', '-pedantic'] ) + + + def get_lib_name(base, is_debug): + if is_debug: + return base + '_d' + else: + return base + + + # Cocoa OS X builds - clang + if target_arch == 'darwin': + nfd_files.append('nfd_cocoa.m') + nfd_env.CC='clang -fcolor-diagnostics' + + # Linux GTK+ 3 builds - GCC + elif target_arch == 'posix': + nfd_files.append('nfd_gtk.c') + nfd_env.ParseConfig( 'pkg-config --cflags gtk+-3.0' ) + + # Windows builds - Visual Studio + elif target_arch == 'win32': + nfd_files.append('nfd_win.cpp') + + if debug: + set_debug(nfd_env) + else: + set_release(nfd_env) + + set_warnings(nfd_env) + + nfd_env.Append( CPPPATH=['.','./include'] ) + nfd_env.StaticLibrary( get_lib_name('nfd', debug), nfd_files ) +SConstruct := (tempfile SConstruct) +summary := "Native File Dialog (Static)" +package nfd + summary summary + platform windows + version revision + cmd := + shell base-dir (dict) + base-dir := + then + cmd "make -j {cpu-core-count} -C build/gmake_windows config=release_x64" + base-dir + in "/include" "{base-dir}/src/include/nfd.h" + in "/build/lib" "{base-dir}/build/lib/Release/x64/nfd.lib" +package nfd + summary summary + platform linux unknown + version revision + cmd := + shell "{base-dir}/src" + dict; + #CFLAGS = "-fPIC" + base-dir := + then + cmd "cp {SConstruct} ./SConstruct" + cmd "scons -j {cpu-core-count}" + base-dir + in "/build/lib" "{base-dir}/src/libnfd.a" + in "/include/nfd" "{base-dir}/src/include/nfd.h" diff --git a/recipes/ode.eo b/recipes/ode.eo new file mode 100644 --- /dev/null +++ b/recipes/ode.eo @@ -0,0 +1,24 @@ +revision := "1970" +repo := + commonpath + extract + download-svn "svn://svn.code.sf.net/p/opende/code/trunk" revision +build-path := repo +cmd := (shell "{build-path}/build" (dict)) +base-dir := "{build-path}/build/gmake" +build-cmd := (shell base-dir (dict)) +repo := + then + cmd "premake4 gmake" + build-cmd "make -j {cpu-core-count} config=releasesingledll" + #build-cmd "make -j {cpu-core-count} config=releasedoubledll" + repo +package ode + summary "Open Dynamics Engine" + platform linux unknown + version "r{revision}" + + alias "/lib/libode.so" "{repo}/lib/ReleaseSingleDLL/libode_single.so" + #alias "/lib/libode.so" "{repo}/lib/ReleaseDoubleDLL/libode_double.so" + + in "/include" "{repo}/include/ode" diff --git a/externals/ode/ode_osx_bootstrap.patch b/recipes/ode/ode_osx_bootstrap.patch rename from externals/ode/ode_osx_bootstrap.patch rename to recipes/ode/ode_osx_bootstrap.patch diff --git a/recipes/portmidi.eo b/recipes/portmidi.eo new file mode 100644 --- /dev/null +++ b/recipes/portmidi.eo @@ -0,0 +1,29 @@ +version := "v2.0.1" +archive := + download + #"https://github.com/PortMidi/portmidi/archive/{revision}.tar.gz" + "https://github.com/PortMidi/portmidi/archive/refs/tags/{version}.tar.gz" +build-path := (commonpath (extract archive)) +base-dir := (mkdir "{build-path}/build") +cmd := (shell build-path) +build-cmd := + shell base-dir + dict + CFLAGS = "-fPIC" + CXXFLAGS = "-fPIC" + CPPFLAGS = "-fPIC" +build-path := + then + build-cmd "cmake -DCMAKE_INSTALL_PREFIX:PATH={base-dir} -DINSTALL_NAME_DIR={base-dir} .." + build-cmd "make -j {cpu-core-count}" + cmd "find" + build-path +package portmidi + summary "PortMidi" + platform linux unknown + version version + + in "/lib" "{build-path}/build/libportmidi.so" + in "/include/portmidi" + "{build-path}/pm_common/portmidi.h" + "{build-path}/porttime/porttime.h" diff --git a/recipes/sdl2.eo b/recipes/sdl2.eo new file mode 100644 --- /dev/null +++ b/recipes/sdl2.eo @@ -0,0 +1,38 @@ +revision := # binding an expression-scoped name + #"a0d15db7bd09" + #"235c5929651c" + "bc90ce38f1e2" # 2.0.10 +archive := # `name := value ...` binds a name to one or multiple values + download # will be downloaded lazily + # string substitution is supported implicitly and defines proper + dependencies. + "http://hg.libsdl.org/SDL/archive/{revision}.tar.gz" +preinstall-dir := + then # `then` brings an arbitrary number of operations in order + build-path := + commonpath # get the common directory of a list of files + extract archive # evaluate to a list of files + build-command := # build a shell environment from a current working + directory and pairs of keys and values + shell + mkdir "{build-path}/build" # `mkdir` ensures the dir exists + dict + CFLAGS = "-fPIC" + CXXFLAGS = "-fPIC" + install-tmp-dir := (tempdir) # every expression has its own scope + so this alias is only available here + build-command "../configure --with-pic --enable-video-vulkan \ + --enable-video-opengl --disable-video-wayland \ + --prefix {install-tmp-dir}" + build-command "make -j {cpu-core-count}" + build-command "make install" + install-tmp-dir +# root entry point for our package + multiple packages can be defined +package sdl2 + summary "Simple DirectMedia Layer" + platform linux unknown + version revision + sopath := "{preinstall-dir}/lib/libSDL2-2.0.so.0.10.0" + alias "/lib/libSDL2-2.0.so.0" sopath + in "/include" "{preinstall-dir}/include/SDL2" diff --git a/externals/stk/premake4.lua b/recipes/stk/premake4.lua rename from externals/stk/premake4.lua rename to recipes/stk/premake4.lua