-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[wcslib] Add wcslib port #31320
[wcslib] Add wcslib port #31320
Conversation
Did you try to use the official build system? CMake may be faster to build, but the vendored build system needs to be reviewed and maintained. And long-term experience from other ports is .... mixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let CI runs finish before pushing change, or we loose access to the failure logs.
Yes, I think this is as far as I've managed to get with it 5eaa02b. There are two issues I've run into:
|
The prefix issue is trivial, just call
Do you feel comfortable with creating patches as needed? |
I think I'll be fine creating patches. Would it be possible for you to provide a snippet showing how to call |
All examples seem to be quite specific... vcpkg/ports/libpq/patches/fix-configure.patch Lines 66 to 70 in 3a409cd
The pattern is
And in the pc file template, remove all |
I had an email discussion with the author of wcslib, Mark Callabreta
This means that the dependencies (especially cfitsio) are only necessary for
I think this means that it will probably be necessary to set |
@microsoft-github-policy-service agree |
@sjperkins, Could you please help test the usage locally? I cannot successfully install wcslib locally, and the error shows that the link timed out when downloading
|
Thanks for trying. I get the following:
Maybe your network blocks outgoing FTP requests? |
@sjperkins, I asked my colleagues to help me to try to install but failed to install, could you test the usage of this port locally? If successful, we can wait to merge this PR. |
Sure! From my perspective, I'm adding wcslib in order to make a port of a larger Radio Astronomy package called casacore. I've already started on this port locally, and it's now able to depend on the wcslib port, but I haven't managed to get That's a fairly large change. From your perspective, what would be useful for me to demonstrate success with wcslib locally? |
Use a simple cmake project to test the usage provided by this port:
|
I've tried this, but I think I'm making a conceptual mistake here. As this is a |
For e.g. the acl port has no usage file |
The usage file is just documentation, and it is desired. This project installs pkgconfig files, and it can be used from cmake in this way. Cf. |
Thanks, I've updated the usage. The following archive test.zip contains a cmake example using code from wcslib utils to compile a utility called cmake_minimum_required(VERSION 3.19.1)
project(fitshdr)
add_executable(fitshdr fitshdr.c)
find_package(PkgConfig)
pkg_check_modules(wcslib REQUIRED IMPORTED_TARGET wcslib)
target_include_directories(fitshdr PRIVATE PkgConfig::wcslib)
target_link_libraries(fitshdr PRIVATE PkgConfig::wcslib) The following compiles $ cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/code/vcpkg/scripts/buildsystems/vcpkg.cmake .. and if one downloads an example FITS file from https://fits.gsfc.nasa.gov/fits_samples.html, its possible to inspect the FITS headers as follows: example```bash $ ./fitshdr ../WFPC2u5780205r_c0fx.fits ================================================================================ FITS header number 1 at block number 1. -------------------------------------------------------------------------------- SIMPLE = T / file does conform to FITS standard BITPIX = -32 / number of bits per data pixel NAXIS = 3 / number of data axes NAXIS1 = 200 / length of data axis 1 NAXIS2 = 200 / length of data axis 2 NAXIS3 = 4 / length of data axis 3 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'Astronomy COMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H BSCALE = 1.0E0 / REAL = TAPE*BSCALE + BZERO BZERO = 0.0E0 / OPSIZE = 2112 / PSIZE of original image ORIGIN = 'STScI-STSDAS' / Fitsio version 21-Feb-1996 FITSDATE= '2004-01-09' / Date FITS file was created FILENAME= 'u5780205r_cvt.c0h' / Original filename ALLG-MAX= 3.777701E3 / Data max in all groups ALLG-MIN= -7.319537E1 / Data min in all groups ODATTYPE= 'FLOATING' / Original datatype: Single precision real SDASMGNU= 4 / Number of groups in original image CRVAL1 = 182.6311886308 CRVAL2 = 39.39633673411 CRPIX1 = 420. CRPIX2 = 424.5 CD1_1 = -1.067040E-6 CD1_2 = -1.259580E-5 CD2_1 = -1.260160E-5 CD2_2 = 1.066550E-6 DATAMIN = -7.319537E1 / DATA MIN DATAMAX = 3.777701E3 / DATA MAX MIR_REVR= T ORIENTAT= -85.16 FILLCNT = 0 ERRCNT = 0 FPKTTIME= 51229.798574 LPKTTIME= 51229.798742 CTYPE1 = 'RA---TAN' CTYPE2 = 'DEC--TAN' DETECTOR= 1 DEZERO = 316.6452 BIASEVEN= 316.6715 BIASODD = 316.6189 GOODMIN = -5.064006 GOODMAX = 2552.17 DATAMEAN= 0.4182382 GPIXELS = 632387 SOFTERRS= 0 CALIBDEF= 1466 STATICD = 0 ATODSAT = 16 DATALOST= 0 BADPIXEL= 0 OVERLAP = 0 PHOTMODE= 'WFPC2,1,A2D7,LRF#4877.0,,CAL' PHOTFLAM= 3.447460E-16 PHOTZPT = -21.1 PHOTPLAM= 4884.258 PHOTBW = 20.20996 MEDIAN = -0.175651 MEDSHADO= -0.121681 HISTWIDE= 1.033711 SKEWNESS= -1.983727 MEANC10 = 0.12958 MEANC25 = 0.3129676 MEANC50 = 0.4577668 MEANC100= 0.3916293 MEANC200= 0.3115222 MEANC300= 0.3295493 BACKGRND= -0.3676353 ORIGIN = 'NOAO-IRAF FITS Image Kernel December 2001' / FITS file originator DATE = '2004-01-09T03:26:36' IRAF-TLM= '03:26:36 (09/01/2004)' FILETYPE= 'SCI ' / type of data found in data fileTELESCOP= 'HST' / telescope used to acquire data
ROOTNAME= 'u5780205r' / rootname of the observation set
MODE = 'FULL' / instr. mode: FULL (full res.), AREA (area int.)
IMAGETYP= 'EXT ' / DARK/BIAS/IFLAT/UFLAT/VFLAT/KSPOT/EXT/ECAL
FILTNAM1= 'FR533P15' / first filter name
UCH1CJTM= -88.2569 / TEC cold junction #1 temperature (Celsius)
MASKCORR= 'COMPLETE' / Do mask correction: PERFORM, OMIT, COMPLETE
MASKFILE= 'uref$f8213081u.r0h ' / name of the input DQF of known bad pixels
SATURATE= 4095 / Data value at which saturation occurs
READTIME= 464 / Length of time for CCD readout in clock ticks
PA_V3 = 49.936909 / position angle of V3-axis of HST (deg)
PODPSFF = 0 / 0=(no podps fill); 1=(podps fill present)
UEXPODUR= 300 / commanded duration of exposure (sec)
SUNANGLE= 141.618347 / angle between sun and V1 axis DATE-OBS= '1999-02-20' / UT date of start of observation (yyyy-mm-dd)
TARGNAME= 'NGC4151 ' / proposer's target name PROPOSID= 8019 / PEP proposal identifier
|
Is anything else required from my side? |
Tested usage tested successfully by
|
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxxvcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.