From: Behdad Esfahbod Date: Sat, 24 Feb 2018 06:51:17 +0000 (-0800) Subject: Include hb-version.h in git (#825) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b91e8da36e164168cd532fd6e6950c5d743a14dd;p=platform%2Fupstream%2FlibHarfBuzzSharp.git Include hb-version.h in git (#825) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b4e108..f7a5d83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,7 +137,7 @@ set (IN_HB_DIST FALSE) if (EXISTS "${PROJECT_SOURCE_DIR}/ChangeLog") # perhaps we are on dist directory set (IN_HB_DIST TRUE) - set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h") + #set (HB_VERSION_H "${PROJECT_SOURCE_DIR}/src/hb-version.h") endif () @@ -180,13 +180,13 @@ add_prefix_to_list(HB_SUBSET_headers "${PROJECT_SOURCE_DIR}/src/") extract_make_variable(HB_BASE_RAGEL_GENERATED_sources ${SRCSOURCES}) extract_make_variable(HB_OT_RAGEL_GENERATED_sources ${SRCSOURCES}) -if (IN_HB_DIST) +#if (IN_HB_DIST) add_prefix_to_list(HB_BASE_RAGEL_GENERATED_sources "${PROJECT_SOURCE_DIR}/src/") add_prefix_to_list(HB_OT_RAGEL_GENERATED_sources "${PROJECT_SOURCE_DIR}/src/") -else () - add_prefix_to_list(HB_BASE_RAGEL_GENERATED_sources "${PROJECT_BINARY_DIR}/src/") - add_prefix_to_list(HB_OT_RAGEL_GENERATED_sources "${PROJECT_BINARY_DIR}/src/") -endif () +#else () +# add_prefix_to_list(HB_BASE_RAGEL_GENERATED_sources "${PROJECT_BINARY_DIR}/src/") +# add_prefix_to_list(HB_OT_RAGEL_GENERATED_sources "${PROJECT_BINARY_DIR}/src/") +#endif () extract_make_variable(HB_VIEW_sources ${UTILSOURCES}) add_prefix_to_list(HB_VIEW_sources "${PROJECT_SOURCE_DIR}/util/") @@ -234,17 +234,17 @@ endif () ## Generate hb-version.h -if (NOT IN_HB_DIST) - set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in") - set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h") - set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true) - configure_file("${HB_VERSION_H_IN}" "${HB_VERSION_H}.tmp" @ONLY) - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different - "${HB_VERSION_H}.tmp" - "${HB_VERSION_H}" - ) - file(REMOVE "${HB_VERSION_H}.tmp") -endif () +#if (NOT IN_HB_DIST) +# set (HB_VERSION_H_IN "${PROJECT_SOURCE_DIR}/src/hb-version.h.in") +# set (HB_VERSION_H "${PROJECT_BINARY_DIR}/src/hb-version.h") +# set_source_files_properties("${HB_VERSION_H}" PROPERTIES GENERATED true) +# configure_file("${HB_VERSION_H_IN}" "${HB_VERSION_H}.tmp" @ONLY) +# execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_if_different +# "${HB_VERSION_H}.tmp" +# "${HB_VERSION_H}" +# ) +# file(REMOVE "${HB_VERSION_H}.tmp") +#endif () ## Define sources and headers of the project @@ -264,7 +264,7 @@ set (subset_project_sources set (project_extra_sources) set (project_headers - ${HB_VERSION_H} + #${HB_VERSION_H} ${HB_BASE_headers} ${HB_OT_headers} diff --git a/src/Makefile.am b/src/Makefile.am index c4d5fb8..3f98e1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,6 @@ HBDEPS = HBSOURCES = $(HB_BASE_sources) HBSOURCES += $(HB_BASE_RAGEL_GENERATED_sources) HBHEADERS = $(HB_BASE_headers) -HBNODISTHEADERS = $(HB_NODIST_headers) if WITH_LIBSTDCXX HBNOLIBCXXCFLAGS = @@ -147,13 +146,13 @@ endif base_link_flags = $(AM_LDFLAGS) -lm -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined libharfbuzz_la_LINK = $(chosen_linker) $(libharfbuzz_la_LDFLAGS) -libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) $(HBNODISTHEADERS) +libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS) libharfbuzz_la_CPPFLAGS = $(HBCFLAGS) $(HBNOLIBCXXFLAGS) libharfbuzz_la_LDFLAGS = $(base_link_flags) $(export_symbols) libharfbuzz_la_LIBADD = $(HBLIBS) EXTRA_libharfbuzz_la_DEPENDENCIES = $(harfbuzz_def_dependency) pkginclude_HEADERS = $(HBHEADERS) -nodist_pkginclude_HEADERS = $(HBNODISTHEADERS) +nodist_pkginclude_HEADERS = pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = harfbuzz.pc cmakedir = $(libdir)/cmake/harfbuzz @@ -392,7 +391,7 @@ TESTS_ENVIRONMENT = \ srcdir="$(srcdir)" \ MAKE="$(MAKE) $(AM_MAKEFLAGS)" \ HBSOURCES="$(HBSOURCES)" \ - HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \ + HBHEADERS="$(HBHEADERS)" \ $(NULL) if HAVE_INTROSPECTION @@ -422,7 +421,6 @@ HarfBuzz_0_0_gir_LIBS = \ $(NULL) HarfBuzz_0_0_gir_FILES = \ $(HBHEADERS) \ - $(HBNODISTHEADERS) \ $(HBSOURCES) \ $(HB_GOBJECT_sources) \ $(HB_GOBJECT_headers) \ diff --git a/src/Makefile.sources b/src/Makefile.sources index 2bb56b4..c07189d 100644 --- a/src/Makefile.sources +++ b/src/Makefile.sources @@ -70,9 +70,6 @@ HB_BASE_headers = \ hb-shape.h \ hb-shape-plan.h \ hb-unicode.h \ - $(NULL) - -HB_NODIST_headers = \ hb-version.h \ $(NULL) diff --git a/src/hb-version.h b/src/hb-version.h new file mode 100644 index 0000000..f0f5a18 --- /dev/null +++ b/src/hb-version.h @@ -0,0 +1,66 @@ +/* + * Copyright © 2011 Google, Inc. + * + * This is part of HarfBuzz, a text shaping library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + * Google Author(s): Behdad Esfahbod + */ + +#ifndef HB_H_IN +#error "Include instead." +#endif + +#ifndef HB_VERSION_H +#define HB_VERSION_H + +#include "hb-common.h" + +HB_BEGIN_DECLS + + +#define HB_VERSION_MAJOR 1 +#define HB_VERSION_MINOR 7 +#define HB_VERSION_MICRO 5 + +#define HB_VERSION_STRING "1.7.5" + +#define HB_VERSION_ATLEAST(major,minor,micro) \ + ((major)*10000+(minor)*100+(micro) <= \ + HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO) + + +HB_EXTERN void +hb_version (unsigned int *major, + unsigned int *minor, + unsigned int *micro); + +HB_EXTERN const char * +hb_version_string (void); + +HB_EXTERN hb_bool_t +hb_version_atleast (unsigned int major, + unsigned int minor, + unsigned int micro); + + +HB_END_DECLS + +#endif /* HB_VERSION_H */