diff options
author | Damjan Jovanovic <damjan@apache.org> | 2016-12-29 07:16:38 +0000 |
---|---|---|
committer | Damjan Jovanovic <damjan@apache.org> | 2016-12-29 07:16:38 +0000 |
commit | 33e7bd7f8c7b59b2bd5b2c2f1be9f3e27f355be3 (patch) | |
tree | fe8b225bb0e008d26f6508c9deaee7c035cd9a26 | |
parent | e826cc83c7bcd9f8b61ab06d4da6205f9a3266c2 (diff) |
Port main/i18nutil to gbuild.
Patch by: me
Notes
Notes:
ignore: obsolete
-rw-r--r-- | Module_ooo.mk | 1 | ||||
-rw-r--r-- | i18nutil/Library_i18nutil.mk | 60 | ||||
-rw-r--r-- | i18nutil/Makefile | 32 | ||||
-rw-r--r-- | i18nutil/Module_i18nutil.mk | 31 | ||||
-rw-r--r-- | i18nutil/Package_inc.mk | 31 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/casefolding.hxx | 3 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/i18nutildllapi.h | 34 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/oneToOneMapping.hxx | 5 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/unicode.hxx | 3 | ||||
-rw-r--r-- | i18nutil/inc/i18nutil/widthfolding.hxx | 3 | ||||
-rw-r--r-- | i18nutil/prj/build.lst | 3 | ||||
-rw-r--r-- | i18nutil/prj/d.lst | 15 | ||||
-rw-r--r-- | i18nutil/prj/makefile.mk | 44 | ||||
-rw-r--r-- | i18nutil/source/utility/makefile.mk | 72 |
14 files changed, 243 insertions, 94 deletions
diff --git a/Module_ooo.mk b/Module_ooo.mk index 8f2318f074fa..5ab4f2ed3fe3 100644 --- a/Module_ooo.mk +++ b/Module_ooo.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ formula \ fpicker \ framework \ + i18nutil \ idl \ io \ javaunohelper \ diff --git a/i18nutil/Library_i18nutil.mk b/i18nutil/Library_i18nutil.mk new file mode 100644 index 000000000000..30cd72a4dda4 --- /dev/null +++ b/i18nutil/Library_i18nutil.mk @@ -0,0 +1,60 @@ +#************************************************************** +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#************************************************************** + + + +$(eval $(call gb_Library_Library,i18nutil)) + +$(eval $(call gb_Library_set_include,i18nutil,\ + $$(INCLUDE) \ + -I$(SRCDIR)/i18nutil/inc \ +)) + +$(eval $(call gb_Library_add_defs,i18nutil,\ + -DI18NUTIL_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_api,i18nutil,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Library_add_linked_libs,i18nutil,\ + cppu \ + sal \ + stl \ + $(gb_STDLIBS) \ +)) + + +$(eval $(call gb_Library_add_exception_objects,i18nutil,\ + i18nutil/source/utility/casefolding \ +)) + +$(eval $(call gb_Library_add_noexception_objects,i18nutil,\ + i18nutil/source/utility/unicode \ + i18nutil/source/utility/widthfolding \ + i18nutil/source/utility/oneToOneMapping \ +)) + + + +# vim: set noet sw=4 ts=4: diff --git a/i18nutil/Makefile b/i18nutil/Makefile new file mode 100644 index 000000000000..c1d144cbd4c9 --- /dev/null +++ b/i18nutil/Makefile @@ -0,0 +1,32 @@ +#************************************************************** +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#************************************************************** + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/i18nutil/Module_i18nutil.mk b/i18nutil/Module_i18nutil.mk new file mode 100644 index 000000000000..79b04e8ce947 --- /dev/null +++ b/i18nutil/Module_i18nutil.mk @@ -0,0 +1,31 @@ +#************************************************************** +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#************************************************************** + + + +$(eval $(call gb_Module_Module,i18nutil)) + +$(eval $(call gb_Module_add_targets,i18nutil,\ + Library_i18nutil \ + Package_inc \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/i18nutil/Package_inc.mk b/i18nutil/Package_inc.mk new file mode 100644 index 000000000000..39cf81d6f05c --- /dev/null +++ b/i18nutil/Package_inc.mk @@ -0,0 +1,31 @@ +#************************************************************** +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#************************************************************** + + + +$(eval $(call gb_Package_Package,i18nutil_inc,$(SRCDIR)/i18nutil/inc/i18nutil)) + +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/i18nutildllapi.h,i18nutildllapi.h)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/casefolding.hxx,casefolding.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/oneToOneMapping.hxx,oneToOneMapping.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/unicode.hxx,unicode.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/widthfolding.hxx,widthfolding.hxx)) +$(eval $(call gb_Package_add_file,i18nutil_inc,inc/i18nutil/x_rtl_ustring.h,x_rtl_ustring.h)) diff --git a/i18nutil/inc/i18nutil/casefolding.hxx b/i18nutil/inc/i18nutil/casefolding.hxx index 0d35ef23879a..df19a9f9b812 100644 --- a/i18nutil/inc/i18nutil/casefolding.hxx +++ b/i18nutil/inc/i18nutil/casefolding.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/uno/RuntimeException.hpp> +#include "i18nutil/i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { @@ -66,7 +67,7 @@ struct MappingElement sal_Int8 current; }; -class casefolding +class I18NUTIL_DLLPUBLIC casefolding { public: static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, com::sun::star::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (com::sun::star::uno::RuntimeException); diff --git a/i18nutil/inc/i18nutil/i18nutildllapi.h b/i18nutil/inc/i18nutil/i18nutildllapi.h new file mode 100644 index 000000000000..15a7d6e670fa --- /dev/null +++ b/i18nutil/inc/i18nutil/i18nutildllapi.h @@ -0,0 +1,34 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + + +#ifndef INCLUDED_I18NUTILDLLAPI_H +#define INCLUDED_I18NUTILDLLAPI_H + +#if defined I18NUTIL_DLLIMPLEMENTATION +#define I18NUTIL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define I18NUTIL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define I18NUTIL_DLLPRIVATE SAL_DLLPRIVATE + +#endif + diff --git a/i18nutil/inc/i18nutil/oneToOneMapping.hxx b/i18nutil/inc/i18nutil/oneToOneMapping.hxx index 50bf7ca5cb38..a71e5d717dc6 100644 --- a/i18nutil/inc/i18nutil/oneToOneMapping.hxx +++ b/i18nutil/inc/i18nutil/oneToOneMapping.hxx @@ -25,6 +25,7 @@ #include <utility> #include <rtl/ustring.hxx> +#include "i18nutil/i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { @@ -42,7 +43,7 @@ typedef struct _UnicodePairWithFlag UnicodePairFlag flag; } UnicodePairWithFlag; -class oneToOneMapping +class I18NUTIL_DLLPUBLIC oneToOneMapping { private: // no copy, no substitution @@ -67,7 +68,7 @@ protected: size_t mnSize; }; -class oneToOneMappingWithFlag : public oneToOneMapping +class I18NUTIL_DLLPUBLIC oneToOneMappingWithFlag : public oneToOneMapping { friend class widthfolding; diff --git a/i18nutil/inc/i18nutil/unicode.hxx b/i18nutil/inc/i18nutil/unicode.hxx index cb5ffcc95fb6..ac20909308ce 100644 --- a/i18nutil/inc/i18nutil/unicode.hxx +++ b/i18nutil/inc/i18nutil/unicode.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/i18n/UnicodeScript.hpp> #include <sal/types.h> +#include "i18nutil/i18nutildllapi.h" typedef struct _ScriptTypeList { sal_Int16 from; @@ -32,7 +33,7 @@ typedef struct _ScriptTypeList { sal_Int16 value; } ScriptTypeList; -class unicode +class I18NUTIL_DLLPUBLIC unicode { public: diff --git a/i18nutil/inc/i18nutil/widthfolding.hxx b/i18nutil/inc/i18nutil/widthfolding.hxx index 3b0ff864af53..c7cc8445f034 100644 --- a/i18nutil/inc/i18nutil/widthfolding.hxx +++ b/i18nutil/inc/i18nutil/widthfolding.hxx @@ -26,12 +26,13 @@ #include <sal/types.h> #include <com/sun/star/uno/Sequence.hxx> #include <i18nutil/oneToOneMapping.hxx> +#include "i18nutil/i18nutildllapi.h" namespace com { namespace sun { namespace star { namespace i18n { #define WIDTHFOLDNIG_DONT_USE_COMBINED_VU 0x01 -class widthfolding +class I18NUTIL_DLLPUBLIC widthfolding { public: static oneToOneMapping& getfull2halfTable(); diff --git a/i18nutil/prj/build.lst b/i18nutil/prj/build.lst index 55c86ad3038f..b0c83f6c8bf8 100644 --- a/i18nutil/prj/build.lst +++ b/i18nutil/prj/build.lst @@ -1,3 +1,2 @@ inu i18nutil : sal cppu offapi NULL -inu i18nutil usr1 - all inu_mkout NULL -inu i18nutil\source\utility nmake - all inu_utility NULL +inu i18nutil\prj nmake - all inu_prj NULL diff --git a/i18nutil/prj/d.lst b/i18nutil/prj/d.lst index 6d8105dacb50..e69de29bb2d1 100644 --- a/i18nutil/prj/d.lst +++ b/i18nutil/prj/d.lst @@ -1,15 +0,0 @@ - -mkdir: %_DEST%\inc%_EXT%\i18nutil - -..\inc\i18nutil\casefolding.hxx %_DEST%\inc%_EXT%\i18nutil\casefolding.hxx -..\inc\i18nutil\oneToOneMapping.hxx %_DEST%\inc%_EXT%\i18nutil\oneToOneMapping.hxx -..\inc\i18nutil\unicode.hxx %_DEST%\inc%_EXT%\i18nutil\unicode.hxx -..\inc\i18nutil\widthfolding.hxx %_DEST%\inc%_EXT%\i18nutil\widthfolding.hxx -..\inc\i18nutil\x_rtl_ustring.h %_DEST%\inc%_EXT%\i18nutil\x_rtl_ustring.h - -..\%__SRC%\bin\i18nutil*.dll %_DEST%\bin%_EXT%\i18nutil*.dll -..\%__SRC%\lib\libi18nutil*.so %_DEST%\lib%_EXT%\libi18nutil*.so -..\%__SRC%\lib\libi18nutil*.dylib %_DEST%\lib%_EXT%\libi18nutil*.dylib -..\%__SRC%\lib\ii18nutil.lib %_DEST%\lib%_EXT%\ii18nutil.lib -..\%__SRC%\lib\i18nutil.lib %_DEST%\lib%_EXT%\i18nutil.lib -..\%__SRC%\lib\ii18nutil.lib %_DEST%\lib%_EXT%\i18nutilgcc3.lib diff --git a/i18nutil/prj/makefile.mk b/i18nutil/prj/makefile.mk new file mode 100644 index 000000000000..c62c6a657d16 --- /dev/null +++ b/i18nutil/prj/makefile.mk @@ -0,0 +1,44 @@ +#************************************************************** +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#************************************************************** + + + +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk + +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF + +.IF "$(DEBUG)"!="" +DEBUG_ARGUMENT=DEBUG=$(DEBUG) +.ELIF "$(debug)"!="" +DEBUG_ARGUMENT=debug=$(debug) +.ELSE +DEBUG_ARGUMENT= +.ENDIF + +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) $(DEBUG_ARGUMENT) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog diff --git a/i18nutil/source/utility/makefile.mk b/i18nutil/source/utility/makefile.mk deleted file mode 100644 index d68883467069..000000000000 --- a/i18nutil/source/utility/makefile.mk +++ /dev/null @@ -1,72 +0,0 @@ -#************************************************************** -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -#************************************************************** -PRJ=..$/.. - -PRJNAME=i18nutil -TARGET=i18nutil -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/casefolding.obj - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/unicode.obj \ - $(SLO)$/widthfolding.obj \ - $(SLO)$/oneToOneMapping.obj - -# Unicode utilities -.IF "$(GUI)" == "OS2" -SHL1TARGET= $(TARGET) -.ELSE -SHL1TARGET= $(TARGET)$(COMID) -.ENDIF -SHL1IMPLIB= i$(TARGET) - -DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME= $(SHL1TARGET) - -SHL1OBJS= $(SLOFILES) - -LIB1TARGET= $(SLB)$/$(SHL1TARGET).lib -LIB1OBJFILES=$(SHL1OBJS) - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ -.INCLUDE : target.mk - -$(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo CLEAR_THE_FILE > $@ - @echo __CT >> $@ - |