summaryrefslogtreecommitdiffstats
path: root/src/tidy-html5.mk
diff options
context:
space:
mode:
authorBoris Pek <tehnick-8@yandex.ru>2017-03-09 21:22:08 (GMT)
committerBoris Pek <tehnick-8@yandex.ru>2017-04-01 14:26:38 (GMT)
commitc0925792a0d0f5856e49d0b5394d95e4f717faeb (patch)
treeb9559134abe374e6c9b37c188bf7d9d42b8b6eee /src/tidy-html5.mk
parent671d517af3c0504a62dd37862b102c3ebeba5593 (diff)
downloadmxe-c0925792a0d0f5856e49d0b5394d95e4f717faeb.zip
mxe-c0925792a0d0f5856e49d0b5394d95e4f717faeb.tar.gz
mxe-c0925792a0d0f5856e49d0b5394d95e4f717faeb.tar.bz2
add package tidy-html5
Diffstat (limited to 'src/tidy-html5.mk')
-rw-r--r--src/tidy-html5.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tidy-html5.mk b/src/tidy-html5.mk
new file mode 100644
index 0000000..e9b04c5
--- /dev/null
+++ b/src/tidy-html5.mk
@@ -0,0 +1,31 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := tidy-html5
+$(PKG)_WEBSITE := http://www.html-tidy.org/
+$(PKG)_DESCR := HTML/XML syntax checker and reformatter
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 5.4.0
+$(PKG)_CHECKSUM := a2d754b7349982e33f12d798780316c047a3b264240dc6bbd4641542e57a0b7a
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := https://github.com/htacg/tidy-html5/archive/$($(PKG)_VERSION).tar.gz
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'https://github.com/htacg/tidy-html5/releases' | \
+ $(SED) -n 's,.*/htacg/tidy-html5/archive/\([0-9][^>]*\)\.tar\.gz.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ mkdir '$(1).build'
+ cd '$(1).build' && $(TARGET)-cmake '$(1)' \
+ -DTIDY_COMPAT_HEADERS:BOOL=YES \
+ -DBUILD_SHARED_LIB=$(CMAKE_SHARED_BOOL)
+ $(MAKE) -C '$(1).build' -j '$(JOBS)'
+ $(MAKE) -C '$(1).build' -j 1 install
+
+ $(if $(BUILD_STATIC),
+ cd '$(PREFIX)/$(TARGET)/lib' && mv libtidys.a libtidy.a,
+ rm -f '$(PREFIX)/$(TARGET)/lib/libtidys.a')
+endef