Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[starlink-ast] create new port #17105

Merged
merged 25 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f8be70c
initial test of AST (broken)
veggiesaurus Apr 2, 2021
8f399c8
slight improvement to build
veggiesaurus Apr 2, 2021
ceb4b38
almost working...
veggiesaurus Apr 5, 2021
edbfc6f
added minpack cflags
veggiesaurus Apr 5, 2021
b6acb38
use static linking
veggiesaurus Apr 5, 2021
d8479a4
yaml and pthreads features added
veggiesaurus Apr 5, 2021
960be2f
debug and release cflags
veggiesaurus Apr 5, 2021
7f4ce40
versioning
veggiesaurus Apr 5, 2021
07cc28b
formated vcpkg.json
veggiesaurus Apr 6, 2021
9165ab4
updated version string
veggiesaurus Apr 6, 2021
2df5474
adjusted based on PR feedback
veggiesaurus Apr 12, 2021
f3153d6
Merge branch 'master' into veggiesaurus/starlink_ast
veggiesaurus Apr 12, 2021
95bf9b1
updated to 9.2.4 release to avoid source patching
veggiesaurus Apr 14, 2021
82cb2a8
removed comments
veggiesaurus Apr 14, 2021
59936d3
updated baseline version
veggiesaurus Apr 14, 2021
5844fa8
Apply suggestions from code review
veggiesaurus Jul 20, 2021
fabbe01
adds supports field to json
veggiesaurus Jul 20, 2021
036a337
Update ports/starlink-ast/portfile.cmake
veggiesaurus Jul 20, 2021
3138435
Merge branch 'veggiesaurus/starlink_ast' of https://github.com/veggie…
veggiesaurus Jul 20, 2021
d471bb7
removed --disabled-shared and MINPACK_NO_DLL
veggiesaurus Jul 20, 2021
28afdbd
use DETERMINE_BUILD_TRIPLET to determine host
veggiesaurus Jul 20, 2021
acfa89d
updates git-tree hash
veggiesaurus Jul 20, 2021
0dc91e9
quotemarks fix
veggiesaurus Jul 21, 2021
07b8e30
git tree hash update
veggiesaurus Jul 21, 2021
80c68b0
Merge branch 'master' into veggiesaurus/starlink_ast
veggiesaurus Jul 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
69 changes: 69 additions & 0 deletions ports/starlink-ast/patch-avoid-gcc-specifics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
diff --git a/src/fitstable.c b/src/fitstable.c
index 606289b..12f77c1 100644
--- a/src/fitstable.c
+++ b/src/fitstable.c
@@ -1399,13 +1399,13 @@ f AST_COLUMNNULL functiom.
/* Append the right number of nulls to the returned array. */
for( iel = 0; iel < nel; iel++ ) {
memcpy( pout, pnull, nb );
- pout += nb;
+ pout = (char*)pout + nb;
}

/* If the cell was found in the table, just increment the pointer to the next
returned value. */
} else {
- pout += nbv;
+ pout = (char*)pout + nbv;
}
}

@@ -2054,7 +2054,7 @@ f The global status.
}

/* Increment the pointer to the next input value. */
- pin += nbv;
+ pin = (char*)pin + nbv;
}

/* Remove any remaining cells already present in this column. */
diff --git a/src/specframe.c b/src/specframe.c
index de592c5..5697e46 100644
--- a/src/specframe.c
+++ b/src/specframe.c
@@ -6124,7 +6124,7 @@ astMAKE_GET(SpecFrame,SourceVRF,AstStdOfRestType,AST__BADSOR,(
/* When clearing SourceVRF, convert the SourceVel value to heliocentric
(but only if set)*/
astMAKE_CLEAR(SpecFrame,SourceVRF,sourcevrf,((astTestSourceVel( this )?
- (void)(astSetSourceVel( this, ConvertSourceVel( this, AST__HLSOR,
+ (void*)(astSetSourceVel( this, ConvertSourceVel( this, AST__HLSOR,
astGetSourceSys( this ), status ) ),NULL):
NULL),AST__BADSOR))

@@ -6134,7 +6134,7 @@ only if set)*/
astMAKE_SET(SpecFrame,SourceVRF,AstStdOfRestType,sourcevrf,(
( ( value >= FIRST_SOR ) && ( value <= LAST_SOR ) && value != AST__SCSOR ) ?
(astTestSourceVel( this )?
- (void)(astSetSourceVel( this,ConvertSourceVel(this,value,astGetSourceSys( this ), status )),NULL):
+ (void*)(astSetSourceVel( this,ConvertSourceVel(this,value,astGetSourceSys( this ), status )),NULL):
NULL), value:( astError( AST__ATTIN, "%s(%s): Bad value (%d) "
"given for SourceVRF attribute.", status,
"astSetSourceVRF", astGetClass( this ), (int) value ),
@@ -6192,7 +6192,7 @@ astMAKE_GET(SpecFrame,SourceSys,AstSystemType,AST__BADSYSTEM,(
/* When clearing SourceSys, convert the SourceVel value to relativistic
velocity (but only if set) */
astMAKE_CLEAR(SpecFrame,SourceSys,sourcesys,((astTestSourceVel( this )?
-(void)(astSetSourceVel( this, ConvertSourceVel( this, astGetSourceVRF( this ),
+(void*)(astSetSourceVel( this, ConvertSourceVel( this, astGetSourceVRF( this ),
AST__VREL, status ) ),NULL):NULL),AST__BADSYSTEM))

/* Validate the SourceSys value being set and report an error if necessary.
@@ -6203,7 +6203,7 @@ astMAKE_SET(SpecFrame,SourceSys,AstSystemType,sourcesys,(
( value == AST__VRADIO ) || ( value == AST__REDSHIFT ) ||
( value == AST__VOPTICAL ) ) ?
(astTestSourceVel( this )?
- (void)(astSetSourceVel( this, ConvertSourceVel( this, astGetSourceVRF( this ),
+ (void*)(astSetSourceVel( this, ConvertSourceVel( this, astGetSourceVRF( this ),
value, status )),NULL):NULL),
value:
( astError( AST__ATTIN, "%s(%s): Bad value (%d) "
20 changes: 20 additions & 0 deletions ports/starlink-ast/patch-use-exeetc-envar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/Makefile.in b/Makefile.in
index a078eb5..7a6ab6d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4475,10 +4475,10 @@ uninstall-am: uninstall-binSCRIPTS uninstall-cincludeHEADERS \

.PRECIOUS: Makefile

-AST_PAR: ast_par.source astbad
- sed -e 's/<AST__BAD>/'`./astbad AST__BAD | tr 'E' 'D'`'/' \
- -e 's/<AST__NAN>/'`./astbad AST__NAN | tr 'E' 'D'`'/' \
- -e 's/<AST__NANR>/'`./astbad AST__NANF | tr 'E' 'D'`'/' \
+AST_PAR: ast_par.source astbad$(EXEEXT)
+ sed -e 's/<AST__BAD>/'`./astbad$(EXEEXT) AST__BAD | tr 'E' 'D'`'/' \
+ -e 's/<AST__NAN>/'`./astbad$(EXEEXT) AST__NAN | tr 'E' 'D'`'/' \
+ -e 's/<AST__NANR>/'`./astbad$(EXEEXT) AST__NANF | tr 'E' 'D'`'/' \
ast_par.source >$@

# ast.h depends on the error-facility files. ast.h _could_ be made

64 changes: 64 additions & 0 deletions ports/starlink-ast/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
vcpkg_fail_port_install(MESSAGE "starlink-ast currently only supports Windows" ON_TARGET "Linux" "OSX")
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/Starlink/ast/releases/download/v9.2.3/ast-9.2.3.tar.gz"
FILENAME "ast-9.2.3.tar.gz"
SHA512 5cd19d153381a22f7a250189321b9914b52ec05e057b48aa735477e414c6b1b535135bfdd72049aaf1ed245b8b9ff2a8664b3fb1d374429d89bab786b491e74e
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
"patch-use-exeetc-envar.patch"
"patch-avoid-gcc-specifics.patch"
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
)

set(CONFIGURE_OPTIONS "--disable-shared --without-fortran star_cv_cnf_trail_type=long star_cv_cnf_f2c_compatible=no")
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved

if ("yaml" IN_LIST FEATURES)
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-yaml")
else()
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-yaml")
endif()

if ("pthreads" IN_LIST FEATURES)
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --with-pthreads")
else()
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --without-pthreads")
endif()


veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
set(CONFIGURE_OPTIONS_DEBUG " CFLAGS='-DCMINPACK_NO_DLL -O0 -g ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}'")
set(CONFIGURE_OPTIONS_RELEASE " CFLAGS='-DCMINPACK_NO_DLL -O2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}'")
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved

set(RELEASE_TRIPLET ${TARGET_TRIPLET}-rel)
set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg)
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=x86_64-w64-mingw32")
else()
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=i686-w64-mingw32")
endif()

vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16 perl)
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
USE_WRAPPERS
OPTIONS ${CONFIGURE_OPTIONS}
OPTIONS_RELEASE ${CONFIGURE_OPTIONS_RELEASE}
OPTIONS_DEBUG ${CONFIGURE_OPTIONS_DEBUG}
)
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved

file(COPY ${SOURCE_PATH}/ast_par.source DESTINATION ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET})
file(COPY ${SOURCE_PATH}/ast_par.source DESTINATION ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET})
file(COPY ${SOURCE_PATH}/makeh DESTINATION ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET})
file(COPY ${SOURCE_PATH}/makeh DESTINATION ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET})

vcpkg_install_make()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share")

# # Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/starlink-ast RENAME copyright)
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
20 changes: 20 additions & 0 deletions ports/starlink-ast/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "starlink-ast",
"version-string": "9.2.3",
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
"description": "The AST library provides a comprehensive range of facilities for attaching world coordinate systems to astronomical data, for retrieving and interpreting that information and for generating graphical output based on it",
"homepage": "https://starlink.eao.hawaii.edu/starlink/AST",
"features": {
"pthreads": {
"description": "build with POSIX threads support",
"dependencies": [
"pthreads"
]
},
"yaml": {
"description": "build with YAML support",
"dependencies": [
"libyaml"
]
}
}
}
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5724,6 +5724,10 @@
"baseline": "0.6.4",
"port-version": 0
},
"starlink-ast": {
"baseline": "9.2.3",
"port-version": 0
},
"status-code": {
"baseline": "1.0.0-ab3cd821",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/starlink-ast.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "00991684d89fe8f81597bb76aa7fd2a151ab3047",
"version-string": "9.2.3",
veggiesaurus marked this conversation as resolved.
Show resolved Hide resolved
"port-version": 0
}
]
}