DEB uncrustify: customize as uncrustify-trinity.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/2/head
Michele Calgaro 3 years ago
parent 112ca8677b
commit 7f3c5d7e3e
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -10,7 +10,6 @@ Vcs-Browser: https://salsa.debian.org/debian/uncrustify
Package: uncrustify-trinity
Architecture: any
Breaks: uncrustify
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: C, C++, ObjectiveC, C#, D, Java, Pawn and VALA source code beautifier
Uncrustify is a highly configurable source code formatter. It aligns

@ -0,0 +1,230 @@
Customize and repackage as a TDE package.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.2)
-project(uncrustify)
+project(uncrustify-trinity)
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "
@@ -231,7 +231,7 @@
#
# Uncrustify
#
-set(uncrustify_sources
+set(uncrustify-trinity_sources
src/align_add.cpp
src/align_asm_colon.cpp
src/align_assign.cpp
@@ -312,7 +312,7 @@
${PROJECT_BINARY_DIR}/src/option_enum.cpp
)
-set(uncrustify_headers
+set(uncrustify-trinity_headers
src/align_add.h
src/align_asm_colon.h
src/align_assign.h
@@ -404,7 +404,7 @@
${PROJECT_BINARY_DIR}/uncrustify_version.h
)
-set(uncrustify_docs
+set(uncrustify-trinity_docs
"${PROJECT_SOURCE_DIR}/AUTHORS"
"${PROJECT_SOURCE_DIR}/BUGS"
"${PROJECT_SOURCE_DIR}/ChangeLog"
@@ -413,31 +413,31 @@
"${PROJECT_SOURCE_DIR}/README.md"
)
-add_executable(uncrustify ${uncrustify_sources} ${uncrustify_headers})
-add_dependencies(uncrustify generate_version_header)
+add_executable(uncrustify-trinity ${uncrustify-trinity_sources} ${uncrustify-trinity_headers})
+add_dependencies(uncrustify-trinity generate_version_header)
if(CMAKE_VERSION VERSION_LESS 2.8.10)
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
# Multi-configuration or build type set
- set_property(TARGET uncrustify APPEND PROPERTY
+ set_property(TARGET uncrustify-trinity APPEND PROPERTY
COMPILE_DEFINITIONS_DEBUG DEBUG
)
else()
# Single-configuration with no build type set
- set_property(TARGET uncrustify APPEND PROPERTY
+ set_property(TARGET uncrustify-trinity APPEND PROPERTY
COMPILE_DEFINITIONS DEBUG
)
endif()
else()
- set_property(TARGET uncrustify APPEND PROPERTY
+ set_property(TARGET uncrustify-trinity APPEND PROPERTY
COMPILE_DEFINITIONS $<$<OR:$<CONFIG:Debug>,$<CONFIG:>>:DEBUG>
)
endif()
#
-# Generate uncrustify.1
+# Generate uncrustify-trinity.1
#
-configure_file(man/uncrustify.1.in uncrustify.1 @ONLY)
+configure_file(man/uncrustify.1.in uncrustify-trinity.1 @ONLY)
#
# Generate uncrustify.xml (katepart highlighting file)
@@ -459,7 +459,7 @@
#
OPTION(ENABLE_CODECOVERAGE "Enable code coverage testing support")
if(ENABLE_CODECOVERAGE)
- set(CODECOVERAGE_DEPENDS uncrustify)
+ set(CODECOVERAGE_DEPENDS uncrustify-trinity)
include(${CMAKE_SOURCE_DIR}/cmake/CodeCoverage.cmake)
endif(ENABLE_CODECOVERAGE)
@@ -467,10 +467,10 @@
# Build command to run uncrustify on its own sources
#
add_custom_target(format-sources)
-foreach(source IN LISTS uncrustify_sources uncrustify_headers)
+foreach(source IN LISTS uncrustify-trinity_sources uncrustify-trinity_headers)
get_filename_component(source_name ${source} NAME)
add_custom_target(format-${source_name}
- COMMAND uncrustify
+ COMMAND uncrustify-trinity
-c forUncrustifySources.cfg
-lCPP --no-backup ${source}
COMMENT "Formatting ${source}"
@@ -482,7 +482,7 @@
#
# Package
#
-set(CPACK_PACKAGE_NAME "uncrustify")
+set(CPACK_PACKAGE_NAME "uncrustify-trinity")
set(CPACK_PACKAGE_VERSION "${UNCRUSTIFY_VERSION}")
set(CPACK_PACKAGE_VENDOR "Ben Gardner")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Code beautifier")
@@ -500,8 +500,8 @@
# Install
#
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
- install(TARGETS uncrustify DESTINATION ".")
- install(FILES ${uncrustify_docs}
+ install(TARGETS uncrustify-trinity DESTINATION ".")
+ install(FILES ${uncrustify-trinity_docs}
DESTINATION "."
)
install(FILES "${PROJECT_SOURCE_DIR}/documentation/htdocs/index.html"
@@ -513,17 +513,17 @@
)
else()
include(GNUInstallDirs)
- install(TARGETS uncrustify
+ install(TARGETS uncrustify-trinity
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/uncrustify.1"
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/uncrustify-trinity.1"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/etc/"
DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples"
FILES_MATCHING PATTERN "*.cfg"
)
- install(FILES ${uncrustify_docs}
+ install(FILES ${uncrustify-trinity_docs}
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
)
endif()
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -32,7 +32,7 @@
add_custom_command(
OUTPUT ${tests_ctest_file}
COMMAND ${PYTHON_EXECUTABLE} run_format_tests.py
- --executable $<TARGET_FILE:uncrustify>
+ --executable $<TARGET_FILE:uncrustify-trinity>
--git ${GIT_EXECUTABLE}
--python ${PYTHON_EXECUTABLE}
--write-ctest ${tests_ctest_file}
@@ -48,7 +48,7 @@
string(REPLACE ".test" "" lang "${suite}")
add_test(NAME ${lang}
COMMAND ${PYTHON_EXECUTABLE} run_format_tests.py ${lang}
- --executable $<TARGET_FILE:uncrustify>
+ --executable $<TARGET_FILE:uncrustify-trinity>
-d --git ${GIT_EXECUTABLE}
--result-dir ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -60,7 +60,7 @@
add_test(
NAME sources_format
COMMAND ${PYTHON_EXECUTABLE} run_sources_tests.py
- --executable $<TARGET_FILE:uncrustify>
+ --executable $<TARGET_FILE:uncrustify-trinity>
-d --git ${GIT_EXECUTABLE}
--result-dir ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -71,7 +71,7 @@
NAME cli_options
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
- --build ${uncrustify_BINARY_DIR}
+ --build ${uncrustify-trinity_BINARY_DIR}
--diff
${_configs}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cli
@@ -80,10 +80,10 @@
add_custom_target(update-cli-options
COMMAND ${PYTHON_EXECUTABLE}
test_cli_options.py
- --build ${uncrustify_BINARY_DIR}
+ --build ${uncrustify-trinity_BINARY_DIR}
--apply
- DEPENDS uncrustify
+ DEPENDS uncrustify-trinity
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cli
)
-add_test(NAME sanity COMMAND uncrustify --help)
+add_test(NAME sanity COMMAND uncrustify-trinity --help)
--- a/tests/cli/output/help.txt
+++ b/tests/cli/output/help.txt
@@ -1,5 +1,5 @@
Usage:
-uncrustify [options] [files ...]
+uncrustify-trinity [options] [files ...]
If no input files are specified, the input is read from stdin
If reading from stdin, you should specify the language using -l
--- a/tests/cli/test_cli_options.py
+++ b/tests/cli/test_cli_options.py
@@ -482,16 +482,16 @@
bin_found = False
uncr_bin = ''
bd_dir = parsed_args.build
- bin_paths = [s_path_join(bd_dir, 'uncrustify'),
- s_path_join(bd_dir, 'uncrustify.exe'),
- s_path_join(bd_dir, 'Debug/uncrustify'),
- s_path_join(bd_dir, 'Debug/uncrustify.exe'),
- s_path_join(bd_dir, 'Release/uncrustify'),
- s_path_join(bd_dir, 'Release/uncrustify.exe'),
- s_path_join(bd_dir, 'RelWithDebInfo/uncrustify'),
- s_path_join(bd_dir, 'RelWithDebInfo/uncrustify.exe'),
- s_path_join(bd_dir, 'MinSizeRel/uncrustify'),
- s_path_join(bd_dir, 'MinSizeRel/uncrustify.exe')]
+ bin_paths = [s_path_join(bd_dir, 'uncrustify-trinity'),
+ s_path_join(bd_dir, 'uncrustify-trinity.exe'),
+ s_path_join(bd_dir, 'Debug/uncrustify-trinity'),
+ s_path_join(bd_dir, 'Debug/uncrustify-trinity.exe'),
+ s_path_join(bd_dir, 'Release/uncrustify-trinity'),
+ s_path_join(bd_dir, 'Release/uncrustify-trinity.exe'),
+ s_path_join(bd_dir, 'RelWithDebInfo/uncrustify-trinity'),
+ s_path_join(bd_dir, 'RelWithDebInfo/uncrustify-trinity.exe'),
+ s_path_join(bd_dir, 'MinSizeRel/uncrustify-trinity'),
+ s_path_join(bd_dir, 'MinSizeRel/uncrustify-trinity.exe')]
for uncr_bin in bin_paths:
if not isfile(uncr_bin):
eprint("is not a file: %s" % uncr_bin)

@ -1 +1,2 @@
docs-remove-remote-images.patch
001_docs-remove-remote-images.patch
002_trinity_customization.diff

Loading…
Cancel
Save