Commit 60d4fa470cb18382b9063051caae13f40c2f378f
1 parent
0151dacc
drobiazgi w pakietach Ubuntu
• dodany „debian release number”, dzięki czemu zrobimy jedno repo z wieloma wersjami, • zmieniony systemowy katalog ze słownikami (morfeusz → morfeusz2) • troszkę poprawionych ostrzeżeń kompilatora
Showing
8 changed files
with
137 additions
and
102 deletions
CMakeLists.txt
... | ... | @@ -4,9 +4,15 @@ project (Morfeusz) |
4 | 4 | |
5 | 5 | set (Morfeusz_VERSION_MAJOR 1) |
6 | 6 | set (Morfeusz_VERSION_MINOR 9) |
7 | -set (Morfeusz_VERSION_PATCH 10) | |
7 | +set (Morfeusz_VERSION_PATCH 11) | |
8 | 8 | set (Morfeusz_VERSION "${Morfeusz_VERSION_MAJOR}.${Morfeusz_VERSION_MINOR}.${Morfeusz_VERSION_PATCH}") |
9 | 9 | set (Morfeusz_LIB_VERSION "${Morfeusz_VERSION}") |
10 | +if (BUILT_ON) | |
11 | + set (Morfeusz_DEB_VERSION "${Morfeusz_VERSION}-${BUILT_ON}") | |
12 | +else () | |
13 | + set (Morfeusz_DEB_VERSION "${Morfeusz_VERSION}") | |
14 | +endif () | |
15 | + | |
10 | 16 | if (DEFAULT_DICT_NAME) |
11 | 17 | set (Morfeusz_VERSION_TWEAK "${DEFAULT_DICT_NAME}") |
12 | 18 | if (DICT_VERSION) |
... | ... | @@ -55,7 +61,7 @@ else () |
55 | 61 | if (NOT DEFAULT_DICT_DIR) |
56 | 62 | set (DEFAULT_DICT_DIR "${CMAKE_CURRENT_BINARY_DIR}/morfeusz") |
57 | 63 | endif () |
58 | - set (DEFAULT_DICT_INSTALL_DIR "share/morfeusz/dictionaries") | |
64 | + set (DEFAULT_DICT_INSTALL_DIR "share/morfeusz2/dictionaries") | |
59 | 65 | endif () |
60 | 66 | |
61 | 67 | add_definitions (-DMORFEUSZ2_VERSION="${Morfeusz_LIB_VERSION}") |
... | ... | @@ -157,7 +163,11 @@ set (CPACK_PACKAGE_FILE_NAME "morfeusz2-${Morfeusz_VERSION}-${CMAKE_SYSTEM_NAME} |
157 | 163 | set (CPACK_PACKAGE_VENDOR "Michał Lenart") |
158 | 164 | set (CPACK_PACKAGE_CONTACT "michal.lenart@ipipan.waw.pl") |
159 | 165 | set (CPACK_DEBIAN_PACKAGE_VERSION "${Morfeusz_VERSION}") |
160 | -set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Morphological analyzer for the Polish language.") | |
166 | +if (BUILT_ON) | |
167 | + set (CPACK_DEBIAN_PACKAGE_RELEASE "${BUILT_ON}") | |
168 | +endif () | |
169 | +#set (CPACK_DEBIAN_PACKAGE_RELEASE "18.04") | |
170 | +set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Morphological analyzer and generator for the Polish language.") | |
161 | 171 | set (CPACK_PACKAGE_DESCRIPTION "This is the second version of Morfeusz. Among numerous improvements it has better segmentation and case-sensitive lemmas handling. It also makes it possible to perform morphological synthesis and to use your own dictionary") |
162 | 172 | set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/License.txt") |
163 | 173 | set (CPACK_OUTPUT_FILE_PREFIX "${TARGET_DIR}") |
... | ... |
fsabuilder/CMakeLists.txt
1 | 1 | |
2 | 2 | set (MORFEUSZBUILDER "morfeusz-builder") |
3 | -set (MORFEUSZBUILDER_VERSION "0.1.0") | |
3 | +set (MORFEUSZBUILDER_VERSION "${Morfeusz_LIB_VERSION}") | |
4 | 4 | set (DIST_PATH "${CMAKE_CURRENT_BINARY_DIR}") |
5 | 5 | |
6 | 6 | set (SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") |
... | ... | @@ -36,10 +36,18 @@ add_custom_target (package-builder-sdist |
36 | 36 | set (PACKAGE_DEPENDS "package-builder-egg" "package-builder-sdist") |
37 | 37 | |
38 | 38 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
39 | + if (BUILT_ON) | |
40 | + add_custom_target (package-builder-deb-sdist | |
41 | + COMMAND python ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing --debian-version ${BUILT_ON} | |
42 | + DEPENDS builder-setup | |
43 | + ) | |
44 | + else () | |
39 | 45 | add_custom_target (package-builder-deb-sdist |
40 | 46 | COMMAND python ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --package "${MORFEUSZBUILDER}" --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --depends python-pyparsing |
41 | 47 | DEPENDS builder-setup |
42 | 48 | ) |
49 | + endif () | |
50 | + | |
43 | 51 | add_custom_target (package-builder-deb-build |
44 | 52 | COMMAND debuild -us -uc |
45 | 53 | WORKING_DIRECTORY deb_dist/${MORFEUSZBUILDER}-${MORFEUSZBUILDER_VERSION} |
... | ... |
morfeusz/CMakeLists.txt
... | ... | @@ -42,13 +42,13 @@ add_custom_target ( dictionary-deb |
42 | 42 | COMMAND "${PROJECT_SOURCE_DIR}/createDictionaryDeb.sh" "${DEFAULT_DICT_DIR}" "${DEFAULT_DICT_NAME}" "${DICT_VERSION}" "${TARGET_DIR}" |
43 | 43 | DEPENDS dictionary) |
44 | 44 | add_custom_target ( bin-deb |
45 | - COMMAND "${PROJECT_SOURCE_DIR}/createBinDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_LIB_VERSION}" "${ARCHITECTURE}" "${TARGET_DIR}" | |
45 | + COMMAND "${PROJECT_SOURCE_DIR}/createBinDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_DEB_VERSION}" "${ARCHITECTURE}" "${TARGET_DIR}" | |
46 | 46 | DEPENDS morfeusz_analyzer morfeusz_generator) |
47 | 47 | add_custom_target ( lib-deb |
48 | - COMMAND "${PROJECT_SOURCE_DIR}/createLibraryDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_LIB_VERSION}" "${ARCHITECTURE}" ${DEFAULT_DICT_NAME} "${TARGET_DIR}" | |
48 | + COMMAND "${PROJECT_SOURCE_DIR}/createLibraryDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_DEB_VERSION}" "${ARCHITECTURE}" ${DEFAULT_DICT_NAME} "${TARGET_DIR}" | |
49 | 49 | DEPENDS libmorfeusz) |
50 | 50 | add_custom_target ( dev-deb |
51 | - COMMAND "${PROJECT_SOURCE_DIR}/createDevDeb.sh" "${PROJECT_SOURCE_DIR}/morfeusz" "${Morfeusz_LIB_VERSION}" "${TARGET_DIR}" | |
51 | + COMMAND "${PROJECT_SOURCE_DIR}/createDevDeb.sh" "${PROJECT_SOURCE_DIR}/morfeusz" "${Morfeusz_DEB_VERSION}" "${TARGET_DIR}" | |
52 | 52 | DEPENDS "${PROJECT_SOURCE_DIR}/morfeusz/morfeusz2.h" "${PROJECT_SOURCE_DIR}/morfeusz/morfeusz2_c.h") |
53 | 53 | |
54 | 54 | |
... | ... |
morfeusz/cli/ezOptionParser.hpp
... | ... | @@ -39,14 +39,14 @@ static T fromString(const std::string* s) { |
39 | 39 | T t; |
40 | 40 | stream >> t; |
41 | 41 | return t; |
42 | -}; | |
42 | +} | |
43 | 43 | template<typename T> |
44 | 44 | static T fromString(const char* s) { |
45 | 45 | std::istringstream stream (s); |
46 | 46 | T t; |
47 | 47 | stream >> t; |
48 | 48 | return t; |
49 | -}; | |
49 | +} | |
50 | 50 | /* ################################################################### */ |
51 | 51 | //static bool isdigit(const std::string & s, int i=0) { |
52 | 52 | // int n = s.length(); |
... | ... | @@ -72,7 +72,7 @@ static bool isdigit(const std::string * s, int i=0) { |
72 | 72 | } |
73 | 73 | |
74 | 74 | return true; |
75 | -}; | |
75 | +} | |
76 | 76 | /* ################################################################### */ |
77 | 77 | /* |
78 | 78 | Compare strings for opts, so short opt flags come before long format flags. |
... | ... | @@ -115,7 +115,7 @@ static bool CmpOptStringPtr(std::string * s1, std::string * s2) { |
115 | 115 | return true; |
116 | 116 | |
117 | 117 | return (s1->compare(*s2)<0); |
118 | -}; | |
118 | +} | |
119 | 119 | /* ################################################################### */ |
120 | 120 | /* |
121 | 121 | Makes a vector of strings from one string, |
... | ... | @@ -133,7 +133,7 @@ static void SplitDelim( const std::string& s, const char token, std::vector<std: |
133 | 133 | result->push_back(newstr); |
134 | 134 | j = i; |
135 | 135 | } |
136 | -}; | |
136 | +} | |
137 | 137 | /* ################################################################### */ |
138 | 138 | // Variant that uses deep copies and references instead of pointers (less efficient). |
139 | 139 | static void SplitDelim( const std::string& s, const char token, std::vector<std::string> & result) { |
... | ... | @@ -148,7 +148,7 @@ static void SplitDelim( const std::string& s, const char token, std::vector<std: |
148 | 148 | result.push_back(newstr); |
149 | 149 | j = i; |
150 | 150 | } |
151 | -}; | |
151 | +} | |
152 | 152 | /* ################################################################### */ |
153 | 153 | // Variant that uses list instead of vector for efficient insertion, etc. |
154 | 154 | static void SplitDelim( const std::string& s, const char token, std::list<std::string*> & result) { |
... | ... | @@ -163,135 +163,135 @@ static void SplitDelim( const std::string& s, const char token, std::list<std::s |
163 | 163 | result.push_back(newstr); |
164 | 164 | j = i; |
165 | 165 | } |
166 | -}; | |
166 | +} | |
167 | 167 | /* ################################################################### */ |
168 | 168 | static void ToU1(std::string ** strings, unsigned char * out, int n) { |
169 | 169 | for(int i=0; i < n; ++i) { |
170 | 170 | out[i] = (unsigned char)atoi(strings[i]->c_str()); |
171 | 171 | } |
172 | -}; | |
172 | +} | |
173 | 173 | /* ################################################################### */ |
174 | 174 | static void ToS1(std::string ** strings, char * out, int n) { |
175 | 175 | for(int i=0; i < n; ++i) { |
176 | 176 | out[i] = (char)atoi(strings[i]->c_str()); |
177 | 177 | } |
178 | -}; | |
178 | +} | |
179 | 179 | /* ################################################################### */ |
180 | 180 | static void ToU2(std::string ** strings, unsigned short * out, int n) { |
181 | 181 | for(int i=0; i < n; ++i) { |
182 | 182 | out[i] = (unsigned short)atoi(strings[i]->c_str()); |
183 | 183 | } |
184 | -}; | |
184 | +} | |
185 | 185 | /* ################################################################### */ |
186 | 186 | static void ToS2(std::string ** strings, short * out, int n) { |
187 | 187 | for(int i=0; i < n; ++i) { |
188 | 188 | out[i] = (short)atoi(strings[i]->c_str()); |
189 | 189 | } |
190 | -}; | |
190 | +} | |
191 | 191 | /* ################################################################### */ |
192 | 192 | static void ToS4(std::string ** strings, int * out, int n) { |
193 | 193 | for(int i=0; i < n; ++i) { |
194 | 194 | out[i] = atoi(strings[i]->c_str()); |
195 | 195 | } |
196 | -}; | |
196 | +} | |
197 | 197 | /* ################################################################### */ |
198 | 198 | static void ToU4(std::string ** strings, unsigned int * out, int n) { |
199 | 199 | for(int i=0; i < n; ++i) { |
200 | 200 | out[i] = (unsigned int)strtoul(strings[i]->c_str(), NULL, 0); |
201 | 201 | } |
202 | -}; | |
202 | +} | |
203 | 203 | /* ################################################################### */ |
204 | 204 | static void ToS8(std::string ** strings, long long * out, int n) { |
205 | 205 | for(int i=0; i < n; ++i) { |
206 | 206 | std::stringstream ss(strings[i]->c_str()); |
207 | 207 | ss >> out[i]; |
208 | 208 | } |
209 | -}; | |
209 | +} | |
210 | 210 | /* ################################################################### */ |
211 | 211 | static void ToU8(std::string ** strings, unsigned long long * out, int n) { |
212 | 212 | for(int i=0; i < n; ++i) { |
213 | 213 | std::stringstream ss(strings[i]->c_str()); |
214 | 214 | ss >> out[i]; |
215 | 215 | } |
216 | -}; | |
216 | +} | |
217 | 217 | /* ################################################################### */ |
218 | 218 | static void ToF(std::string ** strings, float * out, int n) { |
219 | 219 | for(int i=0; i < n; ++i) { |
220 | 220 | out[i] = (float)atof(strings[i]->c_str()); |
221 | 221 | } |
222 | -}; | |
222 | +} | |
223 | 223 | /* ################################################################### */ |
224 | 224 | static void ToD(std::string ** strings, double * out, int n) { |
225 | 225 | for(int i=0; i < n; ++i) { |
226 | 226 | out[i] = (double)atof(strings[i]->c_str()); |
227 | 227 | } |
228 | -}; | |
228 | +} | |
229 | 229 | /* ################################################################### */ |
230 | 230 | static void StringsToInts(std::vector<std::string> & strings, std::vector<int> & out) { |
231 | 231 | for(int i=0; i < strings.size(); ++i) { |
232 | 232 | out.push_back(atoi(strings[i].c_str())); |
233 | 233 | } |
234 | -}; | |
234 | +} | |
235 | 235 | /* ################################################################### */ |
236 | 236 | static void StringsToInts(std::vector<std::string*> * strings, std::vector<int> * out) { |
237 | 237 | for(int i=0; i < strings->size(); ++i) { |
238 | 238 | out->push_back(atoi(strings->at(i)->c_str())); |
239 | 239 | } |
240 | -}; | |
240 | +} | |
241 | 241 | /* ################################################################### */ |
242 | 242 | static void StringsToLongs(std::vector<std::string> & strings, std::vector<long> & out) { |
243 | 243 | for(int i=0; i < strings.size(); ++i) { |
244 | 244 | out.push_back(atol(strings[i].c_str())); |
245 | 245 | } |
246 | -}; | |
246 | +} | |
247 | 247 | /* ################################################################### */ |
248 | 248 | static void StringsToLongs(std::vector<std::string*> * strings, std::vector<long> * out) { |
249 | 249 | for(int i=0; i < strings->size(); ++i) { |
250 | 250 | out->push_back(atol(strings->at(i)->c_str())); |
251 | 251 | } |
252 | -}; | |
252 | +} | |
253 | 253 | /* ################################################################### */ |
254 | 254 | static void StringsToULongs(std::vector<std::string> & strings, std::vector<unsigned long> & out) { |
255 | 255 | for(int i=0; i < strings.size(); ++i) { |
256 | 256 | out.push_back(strtoul(strings[i].c_str(),0,0)); |
257 | 257 | } |
258 | -}; | |
258 | +} | |
259 | 259 | /* ################################################################### */ |
260 | 260 | static void StringsToULongs(std::vector<std::string*> * strings, std::vector<unsigned long> * out) { |
261 | 261 | for(int i=0; i < strings->size(); ++i) { |
262 | 262 | out->push_back(strtoul(strings->at(i)->c_str(),0,0)); |
263 | 263 | } |
264 | -}; | |
264 | +} | |
265 | 265 | /* ################################################################### */ |
266 | 266 | static void StringsToFloats(std::vector<std::string> & strings, std::vector<float> & out) { |
267 | 267 | for(int i=0; i < strings.size(); ++i) { |
268 | 268 | out.push_back(atof(strings[i].c_str())); |
269 | 269 | } |
270 | -}; | |
270 | +} | |
271 | 271 | /* ################################################################### */ |
272 | 272 | static void StringsToFloats(std::vector<std::string*> * strings, std::vector<float> * out) { |
273 | 273 | for(int i=0; i < strings->size(); ++i) { |
274 | 274 | out->push_back(atof(strings->at(i)->c_str())); |
275 | 275 | } |
276 | -}; | |
276 | +} | |
277 | 277 | /* ################################################################### */ |
278 | 278 | static void StringsToDoubles(std::vector<std::string> & strings, std::vector<double> & out) { |
279 | 279 | for(int i=0; i < strings.size(); ++i) { |
280 | 280 | out.push_back(atof(strings[i].c_str())); |
281 | 281 | } |
282 | -}; | |
282 | +} | |
283 | 283 | /* ################################################################### */ |
284 | 284 | static void StringsToDoubles(std::vector<std::string*> * strings, std::vector<double> * out) { |
285 | 285 | for(int i=0; i < strings->size(); ++i) { |
286 | 286 | out->push_back(atof(strings->at(i)->c_str())); |
287 | 287 | } |
288 | -}; | |
288 | +} | |
289 | 289 | /* ################################################################### */ |
290 | 290 | static void StringsToStrings(std::vector<std::string*> * strings, std::vector<std::string> * out) { |
291 | 291 | for(int i=0; i < strings->size(); ++i) { |
292 | 292 | out->push_back( *strings->at(i) ); |
293 | 293 | } |
294 | -}; | |
294 | +} | |
295 | 295 | /* ################################################################### */ |
296 | 296 | static void ToLowerASCII(std::string & s) { |
297 | 297 | int n = s.size(); |
... | ... | @@ -383,7 +383,7 @@ static char** CommandLineToArgvA(char* CmdLine, int* _argc) { |
383 | 383 | |
384 | 384 | (*_argc) = argc; |
385 | 385 | return argv; |
386 | -}; | |
386 | +} | |
387 | 387 | /* ################################################################### */ |
388 | 388 | // Create unique ids with static and still allow single header that avoids multiple definitions linker error. |
389 | 389 | class ezOptionParserIDGenerator { |
... | ... | @@ -464,7 +464,7 @@ public: |
464 | 464 | /* ------------------------------------------------------------------- */ |
465 | 465 | ezOptionValidator::~ezOptionValidator() { |
466 | 466 | reset(); |
467 | -}; | |
467 | +} | |
468 | 468 | /* ------------------------------------------------------------------- */ |
469 | 469 | void ezOptionValidator::reset() { |
470 | 470 | #define CLEAR(TYPE,P) case TYPE: if (P) delete [] P; P = 0; break; |
... | ... | @@ -492,71 +492,71 @@ void ezOptionValidator::reset() { |
492 | 492 | size = 0; |
493 | 493 | op = NOOP; |
494 | 494 | type = NOTYPE; |
495 | -}; | |
495 | +} | |
496 | 496 | /* ------------------------------------------------------------------- */ |
497 | 497 | ezOptionValidator::ezOptionValidator(char _type) : insensitive(0), op(0), size(0), s1(0), type(_type), quiet(0) { |
498 | 498 | id = ezOptionParserIDGenerator::instance().next(); |
499 | -}; | |
499 | +} | |
500 | 500 | /* ------------------------------------------------------------------- */ |
501 | 501 | ezOptionValidator::ezOptionValidator(char _type, char _op, const char* list, int _size) : insensitive(0), op(_op), size(_size), s1(0), type(_type), quiet(0) { |
502 | 502 | id = ezOptionParserIDGenerator::instance().next(); |
503 | 503 | s1 = new char[size]; |
504 | 504 | memcpy(s1, list, size); |
505 | -}; | |
505 | +} | |
506 | 506 | /* ------------------------------------------------------------------- */ |
507 | 507 | ezOptionValidator::ezOptionValidator(char _type, char _op, const unsigned char* list, int _size) : insensitive(0), op(_op), size(_size), u1(0), type(_type), quiet(0) { |
508 | 508 | id = ezOptionParserIDGenerator::instance().next(); |
509 | 509 | u1 = new unsigned char[size]; |
510 | 510 | memcpy(u1, list, size); |
511 | -}; | |
511 | +} | |
512 | 512 | /* ------------------------------------------------------------------- */ |
513 | 513 | ezOptionValidator::ezOptionValidator(char _type, char _op, const short* list, int _size) : insensitive(0), op(_op), size(_size), s2(0), type(_type), quiet(0) { |
514 | 514 | id = ezOptionParserIDGenerator::instance().next(); |
515 | 515 | s2 = new short[size]; |
516 | 516 | memcpy(s2, list, size*sizeof(short)); |
517 | -}; | |
517 | +} | |
518 | 518 | /* ------------------------------------------------------------------- */ |
519 | 519 | ezOptionValidator::ezOptionValidator(char _type, char _op, const unsigned short* list, int _size) : insensitive(0), op(_op), size(_size), u2(0), type(_type), quiet(0) { |
520 | 520 | id = ezOptionParserIDGenerator::instance().next(); |
521 | 521 | u2 = new unsigned short[size]; |
522 | 522 | memcpy(u2, list, size*sizeof(unsigned short)); |
523 | -}; | |
523 | +} | |
524 | 524 | /* ------------------------------------------------------------------- */ |
525 | 525 | ezOptionValidator::ezOptionValidator(char _type, char _op, const int* list, int _size) : insensitive(0), op(_op), size(_size), s4(0), type(_type), quiet(0) { |
526 | 526 | id = ezOptionParserIDGenerator::instance().next(); |
527 | 527 | s4 = new int[size]; |
528 | 528 | memcpy(s4, list, size*sizeof(int)); |
529 | -}; | |
529 | +} | |
530 | 530 | /* ------------------------------------------------------------------- */ |
531 | 531 | ezOptionValidator::ezOptionValidator(char _type, char _op, const unsigned int* list, int _size) : insensitive(0), op(_op), size(_size), u4(0), type(_type), quiet(0) { |
532 | 532 | id = ezOptionParserIDGenerator::instance().next(); |
533 | 533 | u4 = new unsigned int[size]; |
534 | 534 | memcpy(u4, list, size*sizeof(unsigned int)); |
535 | -}; | |
535 | +} | |
536 | 536 | /* ------------------------------------------------------------------- */ |
537 | 537 | ezOptionValidator::ezOptionValidator(char _type, char _op, const long long* list, int _size) : insensitive(0), op(_op), size(_size), s8(0), type(_type), quiet(0) { |
538 | 538 | id = ezOptionParserIDGenerator::instance().next(); |
539 | 539 | s8 = new long long[size]; |
540 | 540 | memcpy(s8, list, size*sizeof(long long)); |
541 | -}; | |
541 | +} | |
542 | 542 | /* ------------------------------------------------------------------- */ |
543 | 543 | ezOptionValidator::ezOptionValidator(char _type, char _op, const unsigned long long* list, int _size) : insensitive(0), op(_op), size(_size), u8(0), type(_type), quiet(0) { |
544 | 544 | id = ezOptionParserIDGenerator::instance().next(); |
545 | 545 | u8 = new unsigned long long[size]; |
546 | 546 | memcpy(u8, list, size*sizeof(unsigned long long)); |
547 | -}; | |
547 | +} | |
548 | 548 | /* ------------------------------------------------------------------- */ |
549 | 549 | ezOptionValidator::ezOptionValidator(char _type, char _op, const float* list, int _size) : insensitive(0), op(_op), size(_size), f(0), type(_type), quiet(0) { |
550 | 550 | id = ezOptionParserIDGenerator::instance().next(); |
551 | 551 | f = new float[size]; |
552 | 552 | memcpy(f, list, size*sizeof(float)); |
553 | -}; | |
553 | +} | |
554 | 554 | /* ------------------------------------------------------------------- */ |
555 | 555 | ezOptionValidator::ezOptionValidator(char _type, char _op, const double* list, int _size) : insensitive(0), op(_op), size(_size), d(0), type(_type), quiet(0) { |
556 | 556 | id = ezOptionParserIDGenerator::instance().next(); |
557 | 557 | d = new double[size]; |
558 | 558 | memcpy(d, list, size*sizeof(double)); |
559 | -}; | |
559 | +} | |
560 | 560 | /* ------------------------------------------------------------------- */ |
561 | 561 | ezOptionValidator::ezOptionValidator(char _type, char _op, const char** list, int _size, bool _insensitive) : insensitive(_insensitive), op(_op), size(_size), t(0), type(_type), quiet(0) { |
562 | 562 | id = ezOptionParserIDGenerator::instance().next(); |
... | ... | @@ -566,7 +566,7 @@ ezOptionValidator::ezOptionValidator(char _type, char _op, const char** list, in |
566 | 566 | for(; i < size; ++i) { |
567 | 567 | t[i] = new std::string(list[i]); |
568 | 568 | } |
569 | -}; | |
569 | +} | |
570 | 570 | /* ------------------------------------------------------------------- */ |
571 | 571 | /* Less efficient but convenient ctor that parses strings to setup validator. |
572 | 572 | _type: s1, u1, s2, u2, ..., f, d, t |
... | ... | @@ -689,11 +689,11 @@ ezOptionValidator::ezOptionValidator(const char* _type, const char* _op, const c |
689 | 689 | case T: t = strings; break; /* Don't erase strings array. */ |
690 | 690 | default: break; |
691 | 691 | } |
692 | -}; | |
692 | +} | |
693 | 693 | /* ------------------------------------------------------------------- */ |
694 | 694 | void ezOptionValidator::print() { |
695 | 695 | printf("id=%d, op=%d, type=%d, size=%d, insensitive=%d\n", id, op, type, size, insensitive); |
696 | -}; | |
696 | +} | |
697 | 697 | /* ------------------------------------------------------------------- */ |
698 | 698 | bool ezOptionValidator::isValid(const std::string * valueAsString) { |
699 | 699 | if (valueAsString == 0) return false; |
... | ... | @@ -924,7 +924,7 @@ bool ezOptionValidator::isValid(const std::string * valueAsString) { |
924 | 924 | } |
925 | 925 | |
926 | 926 | return true; |
927 | -}; | |
927 | +} | |
928 | 928 | /* ################################################################### */ |
929 | 929 | class OptionGroup { |
930 | 930 | public: |
... | ... | @@ -938,7 +938,7 @@ public: |
938 | 938 | flags.clear(); |
939 | 939 | parseIndex.clear(); |
940 | 940 | clearArgs(); |
941 | - }; | |
941 | + } | |
942 | 942 | |
943 | 943 | inline void clearArgs(); |
944 | 944 | inline void getInt(int&); |
... | ... | @@ -993,7 +993,7 @@ void OptionGroup::clearArgs() { |
993 | 993 | |
994 | 994 | args.clear(); |
995 | 995 | isSet = false; |
996 | -}; | |
996 | +} | |
997 | 997 | /* ################################################################### */ |
998 | 998 | void OptionGroup::getInt(int & out) { |
999 | 999 | if (!isSet) { |
... | ... | @@ -1008,7 +1008,7 @@ void OptionGroup::getInt(int & out) { |
1008 | 1008 | out = atoi(args[0]->at(0)->c_str()); |
1009 | 1009 | } |
1010 | 1010 | } |
1011 | -}; | |
1011 | +} | |
1012 | 1012 | /* ################################################################### */ |
1013 | 1013 | void OptionGroup::getLong(long & out) { |
1014 | 1014 | if (!isSet) { |
... | ... | @@ -1023,7 +1023,7 @@ void OptionGroup::getLong(long & out) { |
1023 | 1023 | out = atol(args[0]->at(0)->c_str()); |
1024 | 1024 | } |
1025 | 1025 | } |
1026 | -}; | |
1026 | +} | |
1027 | 1027 | /* ################################################################### */ |
1028 | 1028 | void OptionGroup::getLongLong(long long & out) { |
1029 | 1029 | if (!isSet) { |
... | ... | @@ -1041,7 +1041,7 @@ void OptionGroup::getLongLong(long long & out) { |
1041 | 1041 | ss >> out; |
1042 | 1042 | } |
1043 | 1043 | } |
1044 | -}; | |
1044 | +} | |
1045 | 1045 | /* ################################################################### */ |
1046 | 1046 | void OptionGroup::getULong(unsigned long & out) { |
1047 | 1047 | if (!isSet) { |
... | ... | @@ -1056,7 +1056,7 @@ void OptionGroup::getULong(unsigned long & out) { |
1056 | 1056 | out = strtoul(args[0]->at(0)->c_str(),0,0); |
1057 | 1057 | } |
1058 | 1058 | } |
1059 | -}; | |
1059 | +} | |
1060 | 1060 | /* ################################################################### */ |
1061 | 1061 | void OptionGroup::getULongLong(unsigned long long & out) { |
1062 | 1062 | if (!isSet) { |
... | ... | @@ -1074,7 +1074,7 @@ void OptionGroup::getULongLong(unsigned long long & out) { |
1074 | 1074 | ss >> out; |
1075 | 1075 | } |
1076 | 1076 | } |
1077 | -}; | |
1077 | +} | |
1078 | 1078 | /* ################################################################### */ |
1079 | 1079 | void OptionGroup::getFloat(float & out) { |
1080 | 1080 | if (!isSet) { |
... | ... | @@ -1089,7 +1089,7 @@ void OptionGroup::getFloat(float & out) { |
1089 | 1089 | out = (float)atof(args[0]->at(0)->c_str()); |
1090 | 1090 | } |
1091 | 1091 | } |
1092 | -}; | |
1092 | +} | |
1093 | 1093 | /* ################################################################### */ |
1094 | 1094 | void OptionGroup::getDouble(double & out) { |
1095 | 1095 | if (!isSet) { |
... | ... | @@ -1104,7 +1104,7 @@ void OptionGroup::getDouble(double & out) { |
1104 | 1104 | out = atof(args[0]->at(0)->c_str()); |
1105 | 1105 | } |
1106 | 1106 | } |
1107 | -}; | |
1107 | +} | |
1108 | 1108 | /* ################################################################### */ |
1109 | 1109 | void OptionGroup::getString(std::string & out) { |
1110 | 1110 | if (!isSet) { |
... | ... | @@ -1116,7 +1116,7 @@ void OptionGroup::getString(std::string & out) { |
1116 | 1116 | out = *args[0]->at(0); |
1117 | 1117 | } |
1118 | 1118 | } |
1119 | -}; | |
1119 | +} | |
1120 | 1120 | /* ################################################################### */ |
1121 | 1121 | void OptionGroup::getInts(std::vector<int> & out) { |
1122 | 1122 | if (!isSet) { |
... | ... | @@ -1129,7 +1129,7 @@ void OptionGroup::getInts(std::vector<int> & out) { |
1129 | 1129 | if (!(args.empty() || args[0]->empty())) |
1130 | 1130 | StringsToInts(args[0], &out); |
1131 | 1131 | } |
1132 | -}; | |
1132 | +} | |
1133 | 1133 | /* ################################################################### */ |
1134 | 1134 | void OptionGroup::getLongs(std::vector<long> & out) { |
1135 | 1135 | if (!isSet) { |
... | ... | @@ -1142,7 +1142,7 @@ void OptionGroup::getLongs(std::vector<long> & out) { |
1142 | 1142 | if (!(args.empty() || args[0]->empty())) |
1143 | 1143 | StringsToLongs(args[0], &out); |
1144 | 1144 | } |
1145 | -}; | |
1145 | +} | |
1146 | 1146 | /* ################################################################### */ |
1147 | 1147 | void OptionGroup::getULongs(std::vector<unsigned long> & out) { |
1148 | 1148 | if (!isSet) { |
... | ... | @@ -1155,7 +1155,7 @@ void OptionGroup::getULongs(std::vector<unsigned long> & out) { |
1155 | 1155 | if (!(args.empty() || args[0]->empty())) |
1156 | 1156 | StringsToULongs(args[0], &out); |
1157 | 1157 | } |
1158 | -}; | |
1158 | +} | |
1159 | 1159 | /* ################################################################### */ |
1160 | 1160 | void OptionGroup::getFloats(std::vector<float> & out) { |
1161 | 1161 | if (!isSet) { |
... | ... | @@ -1168,7 +1168,7 @@ void OptionGroup::getFloats(std::vector<float> & out) { |
1168 | 1168 | if (!(args.empty() || args[0]->empty())) |
1169 | 1169 | StringsToFloats(args[0], &out); |
1170 | 1170 | } |
1171 | -}; | |
1171 | +} | |
1172 | 1172 | /* ################################################################### */ |
1173 | 1173 | void OptionGroup::getDoubles(std::vector<double> & out) { |
1174 | 1174 | if (!isSet) { |
... | ... | @@ -1181,7 +1181,7 @@ void OptionGroup::getDoubles(std::vector<double> & out) { |
1181 | 1181 | if (!(args.empty() || args[0]->empty())) |
1182 | 1182 | StringsToDoubles(args[0], &out); |
1183 | 1183 | } |
1184 | -}; | |
1184 | +} | |
1185 | 1185 | /* ################################################################### */ |
1186 | 1186 | void OptionGroup::getStrings(std::vector<std::string>& out) { |
1187 | 1187 | if (!isSet) { |
... | ... | @@ -1192,7 +1192,7 @@ void OptionGroup::getStrings(std::vector<std::string>& out) { |
1192 | 1192 | if (!(args.empty() || args[0]->empty())) |
1193 | 1193 | StringsToStrings(args[0], &out); |
1194 | 1194 | } |
1195 | -}; | |
1195 | +} | |
1196 | 1196 | /* ################################################################### */ |
1197 | 1197 | void OptionGroup::getMultiInts(std::vector< std::vector<int> >& out) { |
1198 | 1198 | if (!isSet) { |
... | ... | @@ -1211,7 +1211,7 @@ void OptionGroup::getMultiInts(std::vector< std::vector<int> >& out) { |
1211 | 1211 | } |
1212 | 1212 | } |
1213 | 1213 | } |
1214 | -}; | |
1214 | +} | |
1215 | 1215 | /* ################################################################### */ |
1216 | 1216 | void OptionGroup::getMultiLongs(std::vector< std::vector<long> >& out) { |
1217 | 1217 | if (!isSet) { |
... | ... | @@ -1230,7 +1230,7 @@ void OptionGroup::getMultiLongs(std::vector< std::vector<long> >& out) { |
1230 | 1230 | } |
1231 | 1231 | } |
1232 | 1232 | } |
1233 | -}; | |
1233 | +} | |
1234 | 1234 | /* ################################################################### */ |
1235 | 1235 | void OptionGroup::getMultiULongs(std::vector< std::vector<unsigned long> >& out) { |
1236 | 1236 | if (!isSet) { |
... | ... | @@ -1249,7 +1249,7 @@ void OptionGroup::getMultiULongs(std::vector< std::vector<unsigned long> >& out) |
1249 | 1249 | } |
1250 | 1250 | } |
1251 | 1251 | } |
1252 | -}; | |
1252 | +} | |
1253 | 1253 | /* ################################################################### */ |
1254 | 1254 | void OptionGroup::getMultiFloats(std::vector< std::vector<float> >& out) { |
1255 | 1255 | if (!isSet) { |
... | ... | @@ -1268,7 +1268,7 @@ void OptionGroup::getMultiFloats(std::vector< std::vector<float> >& out) { |
1268 | 1268 | } |
1269 | 1269 | } |
1270 | 1270 | } |
1271 | -}; | |
1271 | +} | |
1272 | 1272 | /* ################################################################### */ |
1273 | 1273 | void OptionGroup::getMultiDoubles(std::vector< std::vector<double> >& out) { |
1274 | 1274 | if (!isSet) { |
... | ... | @@ -1287,7 +1287,7 @@ void OptionGroup::getMultiDoubles(std::vector< std::vector<double> >& out) { |
1287 | 1287 | } |
1288 | 1288 | } |
1289 | 1289 | } |
1290 | -}; | |
1290 | +} | |
1291 | 1291 | /* ################################################################### */ |
1292 | 1292 | void OptionGroup::getMultiStrings(std::vector< std::vector<std::string> >& out) { |
1293 | 1293 | if (!isSet) { |
... | ... | @@ -1308,7 +1308,7 @@ void OptionGroup::getMultiStrings(std::vector< std::vector<std::string> >& out) |
1308 | 1308 | } |
1309 | 1309 | } |
1310 | 1310 | } |
1311 | -}; | |
1311 | +} | |
1312 | 1312 | /* ################################################################### */ |
1313 | 1313 | typedef std::map< int, ezOptionValidator* > ValidatorMap; |
1314 | 1314 | |
... | ... | @@ -1397,7 +1397,7 @@ void ezOptionParser::reset() { |
1397 | 1397 | validators.clear(); |
1398 | 1398 | optionGroupIds.clear(); |
1399 | 1399 | groupValidators.clear(); |
1400 | -}; | |
1400 | +} | |
1401 | 1401 | /* ################################################################### */ |
1402 | 1402 | void ezOptionParser::resetArgs() { |
1403 | 1403 | int i; |
... | ... | @@ -1415,7 +1415,7 @@ void ezOptionParser::resetArgs() { |
1415 | 1415 | for(i=0; i < lastArgs.size(); ++i) |
1416 | 1416 | delete lastArgs[i]; |
1417 | 1417 | lastArgs.clear(); |
1418 | -}; | |
1418 | +} | |
1419 | 1419 | /* ################################################################### */ |
1420 | 1420 | void ezOptionParser::add(const char * defaults, bool required, int expectArgs, char delim, const char * help, const char * flag1, ezOptionValidator* validator) { |
1421 | 1421 | int id = this->groups.size(); |
... | ... | @@ -1438,7 +1438,7 @@ void ezOptionParser::add(const char * defaults, bool required, int expectArgs, c |
1438 | 1438 | } else { |
1439 | 1439 | groupValidators[id] = -1; |
1440 | 1440 | } |
1441 | -}; | |
1441 | +} | |
1442 | 1442 | /* ################################################################### */ |
1443 | 1443 | void ezOptionParser::add(const char * defaults, bool required, int expectArgs, char delim, const char * help, const char * flag1, const char * flag2, ezOptionValidator* validator) { |
1444 | 1444 | int id = this->groups.size(); |
... | ... | @@ -1465,7 +1465,7 @@ void ezOptionParser::add(const char * defaults, bool required, int expectArgs, c |
1465 | 1465 | } else { |
1466 | 1466 | groupValidators[id] = -1; |
1467 | 1467 | } |
1468 | -}; | |
1468 | +} | |
1469 | 1469 | /* ################################################################### */ |
1470 | 1470 | void ezOptionParser::add(const char * defaults, bool required, int expectArgs, char delim, const char * help, const char * flag1, const char * flag2, const char * flag3, ezOptionValidator* validator) { |
1471 | 1471 | int id = this->groups.size(); |
... | ... | @@ -1495,7 +1495,7 @@ void ezOptionParser::add(const char * defaults, bool required, int expectArgs, c |
1495 | 1495 | } else { |
1496 | 1496 | groupValidators[id] = -1; |
1497 | 1497 | } |
1498 | -}; | |
1498 | +} | |
1499 | 1499 | /* ################################################################### */ |
1500 | 1500 | void ezOptionParser::add(const char * defaults, bool required, int expectArgs, char delim, const char * help, const char * flag1, const char * flag2, const char * flag3, const char * flag4, ezOptionValidator* validator) { |
1501 | 1501 | int id = this->groups.size(); |
... | ... | @@ -1528,7 +1528,7 @@ void ezOptionParser::add(const char * defaults, bool required, int expectArgs, c |
1528 | 1528 | } else { |
1529 | 1529 | groupValidators[id] = -1; |
1530 | 1530 | } |
1531 | -}; | |
1531 | +} | |
1532 | 1532 | /* ################################################################### */ |
1533 | 1533 | bool ezOptionParser::exportFile(const char * filename, bool all) { |
1534 | 1534 | int i; |
... | ... | @@ -1625,7 +1625,7 @@ bool ezOptionParser::exportFile(const char * filename, bool all) { |
1625 | 1625 | file.close(); |
1626 | 1626 | |
1627 | 1627 | return true; |
1628 | -}; | |
1628 | +} | |
1629 | 1629 | /* ################################################################### */ |
1630 | 1630 | // Does not overwrite current options. |
1631 | 1631 | // Returns true if file was read successfully. |
... | ... | @@ -1745,7 +1745,7 @@ bool ezOptionParser::importFile(const char * filename, char comment) { |
1745 | 1745 | delete *iter; |
1746 | 1746 | |
1747 | 1747 | return true; |
1748 | -}; | |
1748 | +} | |
1749 | 1749 | /* ################################################################### */ |
1750 | 1750 | int ezOptionParser::isSet(const char * name) { |
1751 | 1751 | std::string sname(name); |
... | ... | @@ -1755,7 +1755,7 @@ int ezOptionParser::isSet(const char * name) { |
1755 | 1755 | } |
1756 | 1756 | |
1757 | 1757 | return 0; |
1758 | -}; | |
1758 | +} | |
1759 | 1759 | /* ################################################################### */ |
1760 | 1760 | int ezOptionParser::isSet(std::string & name) { |
1761 | 1761 | if (this->optionGroupIds.count(name)) { |
... | ... | @@ -1763,7 +1763,7 @@ int ezOptionParser::isSet(std::string & name) { |
1763 | 1763 | } |
1764 | 1764 | |
1765 | 1765 | return 0; |
1766 | -}; | |
1766 | +} | |
1767 | 1767 | /* ################################################################### */ |
1768 | 1768 | OptionGroup * ezOptionParser::get(const char * name) { |
1769 | 1769 | if (optionGroupIds.count(name)) { |
... | ... | @@ -1771,7 +1771,7 @@ OptionGroup * ezOptionParser::get(const char * name) { |
1771 | 1771 | } |
1772 | 1772 | |
1773 | 1773 | return 0; |
1774 | -}; | |
1774 | +} | |
1775 | 1775 | /* ################################################################### */ |
1776 | 1776 | void ezOptionParser::getUsage(std::string & usage, int width, Layout layout) { |
1777 | 1777 | |
... | ... | @@ -1790,7 +1790,7 @@ void ezOptionParser::getUsage(std::string & usage, int width, Layout layout) { |
1790 | 1790 | if (!footer.empty()) { |
1791 | 1791 | usage.append(footer); |
1792 | 1792 | } |
1793 | -}; | |
1793 | +} | |
1794 | 1794 | /* ################################################################### */ |
1795 | 1795 | // Creates 2 column formatted help descriptions for each option flag. |
1796 | 1796 | void ezOptionParser::getUsageDescriptions(std::string & usage, int width, Layout layout) { |
... | ... | @@ -1930,7 +1930,7 @@ void ezOptionParser::getUsageDescriptions(std::string & usage, int width, Layout |
1930 | 1930 | desc.clear(); |
1931 | 1931 | } |
1932 | 1932 | } |
1933 | -}; | |
1933 | +} | |
1934 | 1934 | /* ################################################################### */ |
1935 | 1935 | bool ezOptionParser::gotExpected(std::vector<std::string> & badOptions) { |
1936 | 1936 | int i,j; |
... | ... | @@ -1952,7 +1952,7 @@ bool ezOptionParser::gotExpected(std::vector<std::string> & badOptions) { |
1952 | 1952 | } |
1953 | 1953 | |
1954 | 1954 | return badOptions.empty(); |
1955 | -}; | |
1955 | +} | |
1956 | 1956 | /* ################################################################### */ |
1957 | 1957 | bool ezOptionParser::gotRequired(std::vector<std::string> & badOptions) { |
1958 | 1958 | int i; |
... | ... | @@ -1967,7 +1967,7 @@ bool ezOptionParser::gotRequired(std::vector<std::string> & badOptions) { |
1967 | 1967 | } |
1968 | 1968 | |
1969 | 1969 | return badOptions.empty(); |
1970 | -}; | |
1970 | +} | |
1971 | 1971 | /* ################################################################### */ |
1972 | 1972 | bool ezOptionParser::gotValid(std::vector<std::string> & badOptions, std::vector<std::string> & badArgs) { |
1973 | 1973 | int groupid, validatorid; |
... | ... | @@ -1997,7 +1997,7 @@ bool ezOptionParser::gotValid(std::vector<std::string> & badOptions, std::vector |
1997 | 1997 | } |
1998 | 1998 | |
1999 | 1999 | return badOptions.empty(); |
2000 | -}; | |
2000 | +} | |
2001 | 2001 | /* ################################################################### */ |
2002 | 2002 | void ezOptionParser::parse(int argc, const char * argv[]) { |
2003 | 2003 | if (argc < 1) return; |
... | ... | @@ -2078,7 +2078,7 @@ void ezOptionParser::parse(int argc, const char * argv[]) { |
2078 | 2078 | for(k=lastOptIndex + 1; k < argc; ++k) { |
2079 | 2079 | this->lastArgs.push_back(new std::string(argv[k])); |
2080 | 2080 | } |
2081 | -}; | |
2081 | +} | |
2082 | 2082 | /* ################################################################### */ |
2083 | 2083 | void ezOptionParser::prettyPrint(std::string & out) { |
2084 | 2084 | char tmp[256]; |
... | ... | @@ -2149,7 +2149,7 @@ void ezOptionParser::prettyPrint(std::string & out) { |
2149 | 2149 | sprintf(tmp, "%d: %s\n", i+1, unknownArgs[i]->c_str()); |
2150 | 2150 | out += tmp; |
2151 | 2151 | } |
2152 | -}; | |
2152 | +} | |
2153 | 2153 | } |
2154 | 2154 | /* ################################################################### */ |
2155 | 2155 | #endif /* EZ_OPTION_PARSER_H */ |
... | ... |
morfeusz/morfeusz_analyzer_old.cpp
... | ... | @@ -25,9 +25,10 @@ int main() { |
25 | 25 | if (mo[0].p == -1) continue; |
26 | 26 | printf("["); |
27 | 27 | while (mo[i].p != -1) { |
28 | - if (prevp != -1) | |
29 | - if (prevp != mo[i].p) printf("]\n["); | |
30 | - else printf("; "); | |
28 | + if (prevp != -1) { | |
29 | + if (prevp != mo[i].p) printf("]\n["); | |
30 | + else printf("; "); | |
31 | + } | |
31 | 32 | printf("%s,%s,%s", |
32 | 33 | // mo[i].p, mo[i].k, |
33 | 34 | mo[i].forma, |
... | ... |
morfeusz/wrappers/java/CMakeLists.txt
... | ... | @@ -67,7 +67,7 @@ add_jar (jmorfeusz |
67 | 67 | |
68 | 68 | add_custom_target(generate-javadoc |
69 | 69 | COMMAND javadoc |
70 | - -d "${TARGET_DIR}/javadoc" | |
70 | + -d "${CMAKE_CURRENT_BINARY_DIR}/javadoc" | |
71 | 71 | -sourcepath "${CMAKE_CURRENT_BINARY_DIR}" |
72 | 72 | -windowtitle "JMorfeusz - Morfeusz Java binding" |
73 | 73 | -use |
... | ... | @@ -77,7 +77,7 @@ add_custom_target(generate-javadoc |
77 | 77 | DEPENDS jmorfeusz) |
78 | 78 | |
79 | 79 | add_custom_target(package-javadoc |
80 | - COMMAND mkdir -p "${TARGET_DIR}" && ${CMAKE_COMMAND} -E tar "cfvz" "${TARGET_DIR}/javadoc.tgz" "${TARGET_DIR}/javadoc" | |
80 | + COMMAND mkdir -p "${TARGET_DIR}" && ${CMAKE_COMMAND} -E tar "cfvz" "${TARGET_DIR}/jmorfeusz-javadoc.tgz" "${CMAKE_CURRENT_BINARY_DIR}/javadoc" | |
81 | 81 | DEPENDS generate-javadoc) |
82 | 82 | |
83 | 83 | if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
... | ... | @@ -94,5 +94,5 @@ add_custom_target(package-java |
94 | 94 | |
95 | 95 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
96 | 96 | add_custom_target(java-deb |
97 | - COMMAND "${PROJECT_SOURCE_DIR}/createJavaDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_LIB_VERSION}" "${ARCHITECTURE}" "${TARGET_DIR}") | |
97 | + COMMAND "${PROJECT_SOURCE_DIR}/createJavaDeb.sh" "${CMAKE_CURRENT_BINARY_DIR}" "${Morfeusz_DEB_VERSION}" "${ARCHITECTURE}" "${TARGET_DIR}") | |
98 | 98 | endif () |
... | ... |
morfeusz/wrappers/python2/CMakeLists.txt
... | ... | @@ -6,6 +6,7 @@ FIND_PACKAGE (PythonLibs ${PY} EXACT) |
6 | 6 | #~ INCLUDE (${SWIG_USE_FILE}) |
7 | 7 | |
8 | 8 | set (PY2MORFEUSZ_VERSION "0.4.0") |
9 | +#set (PY2MORFEUSZ_VERSION "${Morfeusz_VERSION}") | |
9 | 10 | |
10 | 11 | # SWIG Java |
11 | 12 | INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) |
... | ... | @@ -58,12 +59,20 @@ if (UNIX) |
58 | 59 | set (PACKAGE_DEPENDS "package-python2-bin") |
59 | 60 | |
60 | 61 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
62 | + if (BUILT_ON) | |
63 | + add_custom_target (package-python2-deb-sdist | |
64 | + COMMAND python2 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --copyright-file "${PROJECT_SOURCE_DIR}/License.txt" --debian-version ${BUILT_ON} | |
65 | + DEPENDS py2morfeusz | |
66 | + ) | |
67 | + else () | |
61 | 68 | add_custom_target (package-python2-deb-sdist |
62 | 69 | COMMAND python2 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --copyright-file "${PROJECT_SOURCE_DIR}/License.txt" |
63 | 70 | DEPENDS py2morfeusz |
64 | 71 | ) |
72 | + endif () | |
65 | 73 | add_custom_target (package-python2-deb-build |
66 | 74 | COMMAND debuild -us -uc |
75 | +# WORKING_DIRECTORY deb_dist/morfeusz2-${Morfeusz_DEB_VERSION} | |
67 | 76 | WORKING_DIRECTORY deb_dist/morfeusz2-${PY2MORFEUSZ_VERSION} |
68 | 77 | DEPENDS package-python2-deb-sdist |
69 | 78 | ) |
... | ... |
morfeusz/wrappers/python3/CMakeLists.txt
... | ... | @@ -60,10 +60,17 @@ if (UNIX) |
60 | 60 | set (PACKAGE_DEPENDS "package-python3-bin") |
61 | 61 | |
62 | 62 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
63 | + if (BUILT_ON) | |
63 | 64 | add_custom_target (package-python3-deb-sdist |
64 | - COMMAND python3 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --copyright-file "${PROJECT_SOURCE_DIR}/License.txt" | |
65 | - DEPENDS py3morfeusz | |
66 | - ) | |
65 | + COMMAND python3 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --copyright-file "${PROJECT_SOURCE_DIR}/License.txt" --debian-version ${BUILT_ON} | |
66 | + DEPENDS py3morfeusz | |
67 | + ) | |
68 | + else () | |
69 | + add_custom_target (package-python3-deb-sdist | |
70 | + COMMAND python3 ${SETUP_PY} --command-packages=stdeb.command sdist_dsc --depends "${CPACK_DEBIAN_PACKAGE_NAME}" --copyright-file "${PROJECT_SOURCE_DIR}/License.txt" | |
71 | + DEPENDS py3morfeusz | |
72 | + ) | |
73 | + endif () | |
67 | 74 | add_custom_target (package-python3-deb-build |
68 | 75 | COMMAND debuild -us -uc |
69 | 76 | WORKING_DIRECTORY deb_dist/morfeusz2-${PY3MORFEUSZ_VERSION} |
... | ... |