From dfeccd073a5e78f6a2c630355c04121b70d2b4aa Mon Sep 17 00:00:00 2001 From: ebraminio Date: Thu, 12 Oct 2017 12:11:47 +0330 Subject: [PATCH] Remove nmake port of harfbuzz (#562) --- BUILD.md | 12 +- Makefile.am | 2 +- appveyor.yml | 30 ----- configure.ac | 2 - win32/Makefile.am | 18 --- win32/Makefile.vc | 67 ---------- win32/README.txt | 97 -------------- win32/build-rules-msvc.mak | 130 ------------------ win32/config-msvc.mak | 230 -------------------------------- win32/config.h.win32.in | 158 ---------------------- win32/create-lists-msvc.mak | 147 -------------------- win32/create-lists.bat | 42 ------ win32/detectenv-msvc.mak | 146 -------------------- win32/generate-msvc.mak | 39 ------ win32/hb-introspection-msvc.mak | 42 ------ win32/info-msvc.mak | 162 ---------------------- win32/install.mak | 25 ---- win32/introspection-msvc.mak | 73 ---------- win32/pc_base.py | 124 ----------------- win32/replace.py | 115 ---------------- win32/sed-enums-srcs.py | 36 ----- win32/setup.py | 62 --------- 22 files changed, 9 insertions(+), 1750 deletions(-) delete mode 100644 win32/Makefile.am delete mode 100644 win32/Makefile.vc delete mode 100644 win32/README.txt delete mode 100644 win32/build-rules-msvc.mak delete mode 100644 win32/config-msvc.mak delete mode 100644 win32/config.h.win32.in delete mode 100644 win32/create-lists-msvc.mak delete mode 100644 win32/create-lists.bat delete mode 100644 win32/detectenv-msvc.mak delete mode 100644 win32/generate-msvc.mak delete mode 100644 win32/hb-introspection-msvc.mak delete mode 100644 win32/info-msvc.mak delete mode 100644 win32/install.mak delete mode 100644 win32/introspection-msvc.mak delete mode 100644 win32/pc_base.py delete mode 100644 win32/replace.py delete mode 100644 win32/sed-enums-srcs.py delete mode 100644 win32/setup.py diff --git a/BUILD.md b/BUILD.md index 7518c2e42..370c997ac 100644 --- a/BUILD.md +++ b/BUILD.md @@ -5,7 +5,13 @@ Cairo, and GLib. For example, on Ubuntu / Debian, you would do: whereas on Fedora, RHEL, CentOS, and other Red Hat based systems you would do: * sudo yum install gcc gcc-c++ freetype-devel glib2-devel cairo-devel -on the Mac, using MacPorts: +on Windows, consider using [vcpkg](https://github.com/Microsoft/vcpkg), +provided by Microsoft, for building HarfBuzz and other open-source libraries +but if you need to build harfbuzz from source, put ragel binary on your +PATH and follow appveyor CI's cmake +[https://github.com/behdad/harfbuzz/blob/master/appveyor.yml](build steps). + +on macOS, using MacPorts: * sudo port install freetype glib2 cairo or using Homebrew: @@ -14,9 +20,7 @@ or using Homebrew: If you are using a tarball, you can now proceed to running configure and make as with any other standard package. That should leave you with a shared library in src/, and a few utility programs including hb-view and hb-shape -under util/. From the tarball, NMake Makefiles are also provided in win32/, -which supports building HarfBuzz using Visual Studio, with a README.txt that -gives instructions on building using NMake. +under util/. If you are bootstraping from git, you need a few more tools before you can run autogen.sh for the first time. Namely, pkg-config and ragel. Again, on Ubuntu / Debian: diff --git a/Makefile.am b/Makefile.am index 1755b73b6..07b38c287 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ NULL = ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src util test docs win32 +SUBDIRS = src util test docs EXTRA_DIST = \ autogen.sh \ diff --git a/appveyor.yml b/appveyor.yml index 3d3f77742..c27a899f9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,23 +15,6 @@ environment: platform: ARM configuration: Debug - - compiler: nmake - ARCH: amd64 - VCPKG_ARCH: x64-windows - CFG: debug - - compiler: nmake - ARCH: x86 - VCPKG_ARCH: x86-windows - CFG: debug -# - compiler: nmake -# ARCH: amd64 -# VCPKG_ARCH: x64-windows -# CFG: release -# - compiler: nmake -# ARCH: x86 -# VCPKG_ARCH: x86-windows -# CFG: release - - compiler: msys2 MINGW_PREFIX: /c/msys2/mingw64/ MINGW_CHOST: x86_64-w64-mingw32 @@ -44,14 +27,6 @@ environment: install: - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-x86_64-ragel" - - 'if "%compiler%"=="nmake" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%' -# - 'if "%compiler%"=="nmake" git clone https://github.com/Microsoft/vcpkg' -# - 'if "%compiler%"=="nmake" cd vcpkg' -# - 'if "%compiler%"=="nmake" powershell -exec bypass scripts\bootstrap.ps1' -# - 'if "%compiler%"=="nmake" vcpkg install freetype:%VCPKG_ARCH%' -# - 'if "%compiler%"=="nmake" copy installed\%VCPKG_ARCH%\debug\lib\freetyped.lib installed\%VCPKG_ARCH%\lib' -# - 'if "%compiler%"=="nmake" cd ..' - build_script: - 'if "%compiler%"=="cmake" md build' - 'if "%compiler%"=="cmake" cd build' @@ -59,11 +34,6 @@ build_script: - 'if "%compiler%"=="cmake" cmake -DHB_HAVE_UNISCRIBE=ON -DHB_HAVE_DIRECTWRITE=ON -G "%generator%" ../' - 'if "%compiler%"=="cmake" msbuild harfbuzz.sln /p:Configuration=%configuration% /p:Platform=%platform%' - - 'if "%compiler%"=="nmake" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh; make distdir"' - - 'if "%compiler%"=="nmake" cd harfbuzz-*\win32' - - 'if "%compiler%"=="nmake" nmake /f Makefile.vc CFG=%CFG% UNISCRIBE=1 DIRECTWRITE=1' # FREETYPE=1 FREETYPE_DIR=..\..\vcpkg\installed\%VCPKG_ARCH%\include ADDITIONAL_LIB_DIR=..\..\vcpkg\installed\%VCPKG_ARCH%\lib' - - 'if "%compiler%"=="nmake" nmake /f Makefile.vc CFG=%CFG% UNISCRIBE=1 DIRECTWRITE=1 install' # FREETYPE=1 install' - - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config}"' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (cat */test-suite.log test/*/test-suite.log && false)"' diff --git a/configure.ac b/configure.ac index d65cae8cd..7b947f276 100644 --- a/configure.ac +++ b/configure.ac @@ -494,8 +494,6 @@ test/fuzzing/Makefile test/shaping/Makefile docs/Makefile docs/version.xml -win32/Makefile -win32/config.h.win32 ]) AC_OUTPUT diff --git a/win32/Makefile.am b/win32/Makefile.am deleted file mode 100644 index 79ce999da..000000000 --- a/win32/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -EXTRA_DIST = \ - build-rules-msvc.mak \ - config-msvc.mak \ - config.h.win32 \ - create-lists.bat \ - create-lists-msvc.mak \ - detectenv-msvc.mak \ - generate-msvc.mak \ - hb-introspection-msvc.mak \ - info-msvc.mak \ - install.mak \ - introspection-msvc.mak \ - Makefile.vc \ - README.txt \ - replace.py \ - sed-enums-srcs.py - --include $(top_srcdir)/git.mk diff --git a/win32/Makefile.vc b/win32/Makefile.vc deleted file mode 100644 index 05778ae54..000000000 --- a/win32/Makefile.vc +++ /dev/null @@ -1,67 +0,0 @@ -# NMake Makefile for building HarfBuzz as a DLL on Windows - -# The items below this line should not be changed, unless one is maintaining -# the NMake Makefiles. Customizations can be done in the following NMake Makefile -# portions (please see comments in the these files to see what can be customized): -# -# detectenv-msvc.mak -# config-msvc.mak - -!include detectenv-msvc.mak - -# Include the Makefile portions with the source listings -!include ..\src\Makefile.sources -!include ..\src\hb-ucdn\Makefile.sources -!include ..\util\Makefile.sources - -# We need to include the sources in ..\src\hb-ucdn indirectly -!if [call create-lists.bat header hb_ucdn_srcs.mak hb_ucdn_SRCS] -!endif - -!if [for %c in ($(LIBHB_UCDN_sources)) do @call create-lists.bat file hb_ucdn_srcs.mak hb-ucdn\%c] -!endif - -!if [call create-lists.bat footer hb_ucdn_srcs.mak] -!endif - -!include hb_ucdn_srcs.mak - -!if [del /f /q hb_ucdn_srcs.mak] -!endif - -# Include the Makefile portion that enables features based on user input -!include config-msvc.mak - -!if "$(VALID_CFGSET)" == "TRUE" - -# Include the Makefile portion to convert the source and header lists -# into the lists we need for compilation and introspection -!include create-lists-msvc.mak - -all: $(HB_LIBS) $(HB_UTILS) $(EXTRA_TARGETS) all-build-info - -tests: all $(HB_TESTS) - -# Include the build rules for sources, DLLs and executables -!include build-rules-msvc.mak - -# Include the rules for build directory creation and code generation -!include generate-msvc.mak - -# Generate the introspection files - -!if "$(INTROSPECTION)" == "1" -# Include the rules for building the introspection files -!include introspection-msvc.mak -!include hb-introspection-msvc.mak -!endif - -!include install.mak - -!else -all: help - @echo You need to specify a valid configuration, via - @echo CFG=release or CFG=debug -!endif - -!include info-msvc.mak diff --git a/win32/README.txt b/win32/README.txt deleted file mode 100644 index 185a44c3e..000000000 --- a/win32/README.txt +++ /dev/null @@ -1,97 +0,0 @@ -Instructions for building HarfBuzz on Visual Studio -=================================================== -Building the HarfBuzz DLL on Windows is now also supported using Visual Studio -versions 2008 through 2015, in both 32-bit and 64-bit (x64) flavors, via NMake -Makefiles. - -The following are instructions for performing such a build, as there is a -number of build configurations supported for the build. Note that for all -build configurations, the OpenType and Simple TrueType layout (fallback) -backends are enabled, and this is the base configuration that is built if no -options (see below) are specified. A 'clean' target is provided-it is recommended -that one cleans the build and redo the build if any configuration option changed. -An 'install' target is also provided to copy the built items in their appropriate -locations under $(PREFIX), which is described below. A 'reallyclean' target is -provided that not only does what is done for the 'clean' target, but also removes -the sources/headers that are generated from the Ragel sources. Therefore, if one -is not building from a release tarball, or is rebuilding after using the 'reallyclean' -target or when the Ragel (*.rl) sources are updated, the Ragel state machine -compiler (ragel.exe) is needed, and needs to be passed in via RAGEL= -if ragel.exe is not already in the PATH. - -We now support building from a GIT checkout via NMake for convenience. In addition to -the requirements as outlined in the later part of this file, you will need to run the -setup.py (Python 2.7.x or later) script to generate the headers (src\hb-version.h and -win32\config.h.win32) that are normally shipped in a release tarball before running -NMake, and you will need to pass RAGEL= if the Ragel state machine -compiler (ragel.exe) is not in your PATH when invoking NMake. Note that the -'reallyclean' target does not remove these 2 generated headers, so re-run the setup.py -script if necessary. - -Invoke the build by issuing the command: -nmake /f Makefile.vc CFG=[release|debug] [PREFIX=...] -where: - -CFG: Required. Choose from a release or debug build. Note that - all builds generate a .pdb file for each .dll and .exe built--this refers - to the C/C++ runtime that the build uses. - -PREFIX: Optional. Base directory of where the third-party headers, libraries - and needed tools can be found, i.e. headers in $(PREFIX)\include, - libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin. If not - specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where - $(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and - $(X) is the short version of the Visual Studio used, as follows: - 2008: 9 - 2010: 10 - 2012: 11 - 2013: 12 - 2015: 14 - 2017: 15 - -Explanation of options, set by