Created
November 16, 2015 18:38
-
-
Save michal-h21/26fdc64f86b5cb54977f to your computer and use it in GitHub Desktop.
Luarock for justeneoughharfbuzz compilation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy justenoughharfbuzz.c to the directory with these files. Compile it with | |
luarocks make justenoughharfbuzz-0-1.rockspec HARFBUZZ_INCDIR=/usr/include/harfbuzz/ FREETYPE_INCDIR=/usr/include/freetype2/ | |
use real directories with headers for Harfbuzz and Freetype, these above work on Fedora. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package = "JustEnoughHarfbuzz" | |
version = "0-1" | |
source = { | |
url = "..." -- We don't have one yet | |
} | |
description = { | |
summary = "An example for the LuaRocks tutorial.", | |
detailed = [[ | |
This is an example for the LuaRocks tutorial. | |
Here we would put a detailed, typically | |
paragraph-long description. | |
]], | |
homepage = "http://...", -- We don't have one yet | |
license = "MIT/X11" -- or whatever you like | |
} | |
dependencies = { | |
"lua ~> 5.2" | |
-- If you depend on other rocks, add them here | |
} | |
build = { | |
type="make", | |
build_variables = { | |
CFLAGS="$(CFLAGS)", | |
LIBFLAG="$(LIBFLAG)", | |
LUA_LIBDIR="$(LUA_LIBDIR)", | |
LUA_BINDIR="$(LUA_BINDIR)", | |
LUA_INCDIR="$(LUA_INCDIR)", | |
HARFBUZZ_INCDIR = "$(HARFBUZZ_INCDIR)", | |
FREETYPE_INCDIR = "$(FREETYPE_INCDIR)", | |
LUA="$(LUA)", | |
}, | |
install_variables = { | |
INST_PREFIX="$(PREFIX)", | |
INST_BINDIR="$(BINDIR)", | |
INST_LIBDIR="$(LIBDIR)", | |
INST_LUADIR="$(LUADIR)", | |
INST_CONFDIR="$(CONFDIR)", | |
}, | |
} | |
-- external_dependencies = { | |
-- HARFBUZZ = { | |
-- library = "harfbuzz", | |
-- header = "hb.h" | |
-- }, | |
-- FREETYPE = { | |
-- library = "freetype" | |
-- } | |
-- } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: justenoughharfbuzz.so | |
justenoughharfbuzz.so: justenoughharfbuzz.o | |
$(CC) $(LIBFLAG) -lharfbuzz $< -o $@ | |
justenoughharfbuzz.o: justenoughharfbuzz.c | |
$(CC) -c $(CFLAGS) -I$(HARFBUZZ_INCDIR) -I$(FREETYPE_INCDIR) $< -o $@ | |
install: | |
@echo Install justenoughharfbuzz | |
@cp justenoughharfbuzz.so $(INST_LIBDIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment