Index: head/graphics/Makefile =================================================================== --- head/graphics/Makefile (revision 432803) +++ head/graphics/Makefile (revision 432804) @@ -1,1103 +1,1104 @@ # $FreeBSD$ # COMMENT = Graphics tools and libraries SUBDIR += 4va SUBDIR += Coin SUBDIR += EZWGL SUBDIR += GraphicsMagick SUBDIR += Hermes SUBDIR += IPA SUBDIR += ImageMagick SUBDIR += ImageMagick-nox11 SUBDIR += ImageMagick7 SUBDIR += ImageMagick7-nox11 SUBDIR += O2-tools SUBDIR += OpenEXR SUBDIR += R-cran-DiagrammeR SUBDIR += R-cran-GDD SUBDIR += R-cran-RColorBrewer SUBDIR += R-cran-colorspace SUBDIR += R-cran-diagram SUBDIR += R-cran-dichromat SUBDIR += R-cran-dygraphs SUBDIR += R-cran-ggplot2 SUBDIR += R-cran-gridBase SUBDIR += R-cran-munsell SUBDIR += R-cran-pixmap SUBDIR += R-cran-png SUBDIR += R-cran-rgdal SUBDIR += R-cran-rtiff SUBDIR += R-cran-scales SUBDIR += R-cran-shape SUBDIR += R-cran-visNetwork SUBDIR += SciPlot SUBDIR += a2png SUBDIR += aalib SUBDIR += aaphoto SUBDIR += acidwarp SUBDIR += aeskulap SUBDIR += agave SUBDIR += agg SUBDIR += alembic SUBDIR += alpng SUBDIR += amide SUBDIR += ampasACES-container SUBDIR += ampasCTL SUBDIR += animorph SUBDIR += ansilove SUBDIR += aoi SUBDIR += apngasm SUBDIR += apngdis SUBDIR += appleseed SUBDIR += apvlv SUBDIR += aqsis SUBDIR += argyllcms SUBDIR += asciio SUBDIR += aseprite SUBDIR += atril SUBDIR += atril-lite SUBDIR += autopano-sift-c SUBDIR += autoq3d SUBDIR += autotrace SUBDIR += aview SUBDIR += ayam SUBDIR += backfract SUBDIR += barbecue SUBDIR += barcode SUBDIR += batik SUBDIR += blender SUBDIR += blender-doc SUBDIR += bmeps SUBDIR += bmp2html SUBDIR += box SUBDIR += boxer SUBDIR += bugle SUBDIR += burplex SUBDIR += c-a-i-r SUBDIR += cadubi SUBDIR += cairo SUBDIR += cairo-reference SUBDIR += cairomm SUBDIR += cal3d SUBDIR += camera SUBDIR += camerakit SUBDIR += cbrpager SUBDIR += cbview SUBDIR += cbviewer SUBDIR += cegui SUBDIR += cenon SUBDIR += cfdg SUBDIR += chbg SUBDIR += cimg SUBDIR += cinepaint SUBDIR += clutter SUBDIR += clutter-gtk SUBDIR += clutter-gtk3 SUBDIR += cluttermm SUBDIR += code-eli SUBDIR += cogl SUBDIR += colmap SUBDIR += colord SUBDIR += colord-gtk SUBDIR += comical SUBDIR += commons-utilities SUBDIR += compupic SUBDIR += converseen SUBDIR += copperspice SUBDIR += cosmoplayer SUBDIR += crw SUBDIR += cthumb SUBDIR += cuneiform SUBDIR += curator SUBDIR += cuttlefish SUBDIR += danpei SUBDIR += darknock SUBDIR += darktable SUBDIR += dataplot SUBDIR += dc20pack SUBDIR += dcp2icc SUBDIR += dcraw SUBDIR += dcraw-m SUBDIR += deegree-csw SUBDIR += deegree-igeoportal SUBDIR += deegree-wcs SUBDIR += deegree-wfs SUBDIR += deegree-wms SUBDIR += deegree-wps SUBDIR += deegree-wpvs SUBDIR += delaboratory SUBDIR += devil SUBDIR += dia SUBDIR += diacanvas2 SUBDIR += diffpdf SUBDIR += digikam-kde4 SUBDIR += digikam-kde4-doc SUBDIR += digikam-kde4-l10n SUBDIR += dilay SUBDIR += ditaa SUBDIR += djview4 SUBDIR += djview4-qt4 SUBDIR += djvulibre SUBDIR += dmtx-utils SUBDIR += dri SUBDIR += driconf SUBDIR += duhdraw SUBDIR += dynamechs SUBDIR += easypaint SUBDIR += edje_viewer SUBDIR += electrix SUBDIR += embree SUBDIR += enblend SUBDIR += entangle SUBDIR += eog SUBDIR += eog-plugins SUBDIR += eom SUBDIR += eos-movrec SUBDIR += epdfview SUBDIR += epix SUBDIR += eps2png SUBDIR += epstool SUBDIR += eterm-bg SUBDIR += evince SUBDIR += evince-lite SUBDIR += evolvotron SUBDIR += exact-image SUBDIR += exif SUBDIR += exifprobe SUBDIR += exiftags SUBDIR += exiftran SUBDIR += exiv2 SUBDIR += exrtools SUBDIR += farbfeld SUBDIR += feh SUBDIR += fig2sxd SUBDIR += figurine SUBDIR += flam3 SUBDIR += flasm SUBDIR += flphoto SUBDIR += fly SUBDIR += fortytwo SUBDIR += fotofix SUBDIR += fotoxx SUBDIR += founts SUBDIR += fpc-cairo SUBDIR += fpc-graph SUBDIR += fpc-hermes SUBDIR += fpc-imagemagick SUBDIR += fpc-libgd SUBDIR += fpc-libpng SUBDIR += fpc-ncurses SUBDIR += fpc-opengl SUBDIR += fpc-pasjpeg SUBDIR += fpc-proj4 SUBDIR += fpc-rsvg SUBDIR += fpc-svgalib SUBDIR += fracplanet SUBDIR += fraqtive SUBDIR += freeglut SUBDIR += freeimage SUBDIR += frei0r SUBDIR += frei0r-plugins SUBDIR += frei0r-plugins-gavl SUBDIR += frei0r-plugins-opencv SUBDIR += frogr SUBDIR += ftgl SUBDIR += fujiplay SUBDIR += fusefs-gphotofs SUBDIR += fv SUBDIR += fyre SUBDIR += g2 SUBDIR += gauche-gl SUBDIR += gbm SUBDIR += gcolor SUBDIR += gcolor2 SUBDIR += gd SUBDIR += gdal SUBDIR += gdchart SUBDIR += gdk-pixbuf SUBDIR += gdk-pixbuf2 SUBDIR += gdtclft SUBDIR += geeqie SUBDIR += gegl SUBDIR += gegl3 SUBDIR += generic_image_decoder SUBDIR += geoapi SUBDIR += geomorph SUBDIR += geomview SUBDIR += geos SUBDIR += geoserver SUBDIR += gexiv2 SUBDIR += giblib SUBDIR += gif2png SUBDIR += giflib SUBDIR += gifmerge SUBDIR += gifsicle SUBDIR += giftool SUBDIR += gimageview SUBDIR += gimmage SUBDIR += gimp SUBDIR += gimp-app SUBDIR += gimp-beautify-plugin SUBDIR += gimp-data-extras SUBDIR += gimp-elsamuko-script SUBDIR += gimp-ez-perspective-plugin SUBDIR += gimp-focusblur-plugin SUBDIR += gimp-gmic-plugin SUBDIR += gimp-help SUBDIR += gimp-jagged-border-script SUBDIR += gimp-lensfun-plugin SUBDIR += gimp-lqr-plugin SUBDIR += gimp-manual-html SUBDIR += gimp-refocus-plugin SUBDIR += gimp-resynthesizer SUBDIR += gimp-save-for-web SUBDIR += gimp-wavelet-decompose-plugin SUBDIR += gimp-wavelet-denoise-plugin SUBDIR += gimp-wavelet-sharpen-plugin SUBDIR += gimpfx-foundry SUBDIR += giram SUBDIR += gkrellkam2 SUBDIR += gle SUBDIR += gle-graphics SUBDIR += glew SUBDIR += glexcess SUBDIR += glfw SUBDIR += glfw2 SUBDIR += glitz SUBDIR += gliv SUBDIR += glosm SUBDIR += glpng SUBDIR += gltt SUBDIR += gmt SUBDIR += gnash SUBDIR += gnofract4d SUBDIR += gnome-color-manager SUBDIR += gnome-video-effects SUBDIR += gnustep-slideshow SUBDIR += gnustep-slideshowkit SUBDIR += gocr SUBDIR += goocanvas SUBDIR += goocanvas2 SUBDIR += goocanvasmm SUBDIR += goocanvasmm2 SUBDIR += goom SUBDIR += gource SUBDIR += gpaint SUBDIR += gphoto2 SUBDIR += gpicview SUBDIR += gpsmanshp SUBDIR += gracula SUBDIR += grads SUBDIR += grafx2 SUBDIR += graphite2 SUBDIR += graphopt SUBDIR += graphos SUBDIR += graphviz SUBDIR += grx SUBDIR += gscan2pdf SUBDIR += gsculpt SUBDIR += gstreamer-plugins-aalib SUBDIR += gstreamer-plugins-cairo SUBDIR += gstreamer-plugins-gdkpixbuf SUBDIR += gstreamer-plugins-gl SUBDIR += gstreamer-plugins-jpeg SUBDIR += gstreamer-plugins-libcaca SUBDIR += gstreamer-plugins-libpng SUBDIR += gstreamer-plugins-libvisual SUBDIR += gstreamer-plugins-opencv SUBDIR += gstreamer1-plugins-aalib SUBDIR += gstreamer1-plugins-cairo SUBDIR += gstreamer1-plugins-gdkpixbuf SUBDIR += gstreamer1-plugins-gl SUBDIR += gstreamer1-plugins-jpeg SUBDIR += gstreamer1-plugins-libcaca SUBDIR += gstreamer1-plugins-libvisual SUBDIR += gstreamer1-plugins-opencv SUBDIR += gstreamer1-plugins-openjpeg SUBDIR += gstreamer1-plugins-png SUBDIR += gstreamer1-plugins-rsvg SUBDIR += gstreamer1-plugins-webp SUBDIR += gstreamer1-plugins-zbar SUBDIR += gthumb SUBDIR += gtimelapse SUBDIR += gtk-update-icon-cache SUBDIR += gtkam SUBDIR += gts SUBDIR += guilib SUBDIR += gwenview-kde4 SUBDIR += gx SUBDIR += hdr_tools SUBDIR += hiptext SUBDIR += hobbes-icons-xpm SUBDIR += hppsmtools SUBDIR += hs-HGL SUBDIR += hs-JuicyPixels SUBDIR += hs-cairo SUBDIR += hs-dia-base SUBDIR += hs-dia-functions SUBDIR += hs-svgcairo SUBDIR += hsetroot SUBDIR += hugin SUBDIR += icat SUBDIR += icc-profiles-basiccolor SUBDIR += icc-profiles-openicc SUBDIR += iccexamin SUBDIR += iccxml SUBDIR += icon-slicer SUBDIR += icontact SUBDIR += icoutils SUBDIR += ida SUBDIR += iec16022 SUBDIR += iiview SUBDIR += ilmbase SUBDIR += imageindex SUBDIR += imageviewer SUBDIR += imageworsener SUBDIR += imc SUBDIR += imgtops SUBDIR += imgv SUBDIR += imlib2 SUBDIR += imlib2_loaders SUBDIR += impressive SUBDIR += imv SUBDIR += inkscape SUBDIR += intel-backlight SUBDIR += intergif SUBDIR += inventor SUBDIR += ipe SUBDIR += iulib SUBDIR += jalbum SUBDIR += jasper SUBDIR += jave6 SUBDIR += jbig2dec SUBDIR += jbigkit SUBDIR += jdraw SUBDIR += jgraph SUBDIR += jhead SUBDIR += jogamp-jogl SUBDIR += jogl SUBDIR += jp2a SUBDIR += jpatch SUBDIR += jpeg SUBDIR += jpeg-turbo SUBDIR += jpeginfo SUBDIR += jpegoptim SUBDIR += jpg2pdf SUBDIR += jpgraph2 SUBDIR += jpgtn SUBDIR += jslice SUBDIR += kamera-kde4 SUBDIR += kcolorchooser SUBDIR += kcoloredit SUBDIR += kdegraphics4 SUBDIR += kdegraphics4-mobipocket SUBDIR += kdegraphics4-strigi-analyzer SUBDIR += kdegraphics4-svgpart SUBDIR += kdegraphics4-thumbnailers SUBDIR += kf5-kimageformats SUBDIR += kf5-kplotting SUBDIR += kf5-prison SUBDIR += kiconedit SUBDIR += kipi-plugin-acquireimages SUBDIR += kipi-plugin-advancedslideshow SUBDIR += kipi-plugin-batchprocess SUBDIR += kipi-plugin-calendar SUBDIR += kipi-plugin-debianscreenshots SUBDIR += kipi-plugin-dngconverter SUBDIR += kipi-plugin-dropbox SUBDIR += kipi-plugin-expoblending SUBDIR += kipi-plugin-facebook SUBDIR += kipi-plugin-flashexport SUBDIR += kipi-plugin-flickrexport SUBDIR += kipi-plugin-galleryexport SUBDIR += kipi-plugin-googleservices SUBDIR += kipi-plugin-gpssync SUBDIR += kipi-plugin-htmlexport SUBDIR += kipi-plugin-imageshackexport SUBDIR += kipi-plugin-imageviewer SUBDIR += kipi-plugin-imgurexport SUBDIR += kipi-plugin-ipodexport SUBDIR += kipi-plugin-jalbumexport SUBDIR += kipi-plugin-jpeglossless SUBDIR += kipi-plugin-kioexport SUBDIR += kipi-plugin-kmlexport SUBDIR += kipi-plugin-kopete SUBDIR += kipi-plugin-mediawiki SUBDIR += kipi-plugin-metadataedit SUBDIR += kipi-plugin-panorama SUBDIR += kipi-plugin-photolayoutseditor SUBDIR += kipi-plugin-piwigoexport SUBDIR += kipi-plugin-printimages SUBDIR += kipi-plugin-rajceexport SUBDIR += kipi-plugin-rawconverter SUBDIR += kipi-plugin-removeredeyes SUBDIR += kipi-plugin-sendimages SUBDIR += kipi-plugin-shwup SUBDIR += kipi-plugin-smug SUBDIR += kipi-plugin-timeadjust SUBDIR += kipi-plugin-videoslideshow SUBDIR += kipi-plugin-vkontakte SUBDIR += kipi-plugin-yandexfotki SUBDIR += kipi-plugins-kde4 SUBDIR += kix-kmod SUBDIR += klatexformula SUBDIR += kludge3d SUBDIR += kolourpaint SUBDIR += kphotoalbum-kde4 SUBDIR += kpovmodeler SUBDIR += kqtquickcharts SUBDIR += ksaneplugin SUBDIR += ksnapshot SUBDIR += kudu SUBDIR += l2p SUBDIR += laternamagica SUBDIR += lcdtest SUBDIR += lcms SUBDIR += lcms-python SUBDIR += lcms2 SUBDIR += leafpak SUBDIR += lensfun SUBDIR += lepton SUBDIR += leptonica SUBDIR += lfview SUBDIR += lib3ds SUBDIR += libEGL SUBDIR += libGL SUBDIR += libGLU SUBDIR += libGLw SUBDIR += libafterimage SUBDIR += libart_lgpl SUBDIR += libboard SUBDIR += libbpg SUBDIR += libcaca SUBDIR += libcdr01 SUBDIR += libchamplain SUBDIR += libdmtx SUBDIR += libdrm SUBDIR += libecwj2 SUBDIR += libemf SUBDIR += libepoxy SUBDIR += libetonyek01 SUBDIR += libexif SUBDIR += libexif-gtk SUBDIR += libfpx SUBDIR += libfreehand SUBDIR += libgaiagraphics SUBDIR += libgeotiff SUBDIR += libgfx SUBDIR += libglapi SUBDIR += libglesv2 SUBDIR += libgltext SUBDIR += libgltf SUBDIR += libgnomecanvas SUBDIR += libgnomecanvas-reference SUBDIR += libgnomecanvasmm26 SUBDIR += libgphoto2 SUBDIR += libgxps SUBDIR += libimg SUBDIR += libiptcdata SUBDIR += libjpeg-turbo SUBDIR += libkdcraw-kde4 SUBDIR += libkexiv2-kde4 SUBDIR += libkface SUBDIR += libkipi-kde4 SUBDIR += libkipiplugins SUBDIR += libksane SUBDIR += libkscreen SUBDIR += liblqr-1 SUBDIR += liblug SUBDIR += libmng SUBDIR += libmorph SUBDIR += libnsbmp SUBDIR += libnsgif SUBDIR += libopenraw SUBDIR += libosmesa SUBDIR += libpano13 SUBDIR += libpcd SUBDIR += libpgf SUBDIR += libpotrace SUBDIR += libprojectm SUBDIR += libpuzzle SUBDIR += libqrencode SUBDIR += librasterlite SUBDIR += librasterlite2 SUBDIR += libraw SUBDIR += libreatlas SUBDIR += librsvg2 SUBDIR += libsixel SUBDIR += libspiro SUBDIR += libsvg SUBDIR += libsvg-cairo SUBDIR += libvisual SUBDIR += libvisual04 SUBDIR += libvisual04-plugins SUBDIR += libwmf SUBDIR += libwmf-nox11 SUBDIR += libwpg03 SUBDIR += libyuv SUBDIR += lightzone SUBDIR += linplasma SUBDIR += linux-adobesvg SUBDIR += linux-c6-cairo SUBDIR += linux-c6-dri SUBDIR += linux-c6-gdk-pixbuf2 SUBDIR += linux-c6-glx-utils SUBDIR += linux-c6-jasper SUBDIR += linux-c6-jpeg SUBDIR += linux-c6-png SUBDIR += linux-c6-sdl_image SUBDIR += linux-c6-sdl_ttf SUBDIR += linux-c6-tiff SUBDIR += linux-c7-cairo SUBDIR += linux-c7-dri SUBDIR += linux-c7-gdk-pixbuf2 SUBDIR += linux-c7-glx-utils SUBDIR += linux-c7-graphite2 SUBDIR += linux-c7-jasper SUBDIR += linux-c7-jbigkit SUBDIR += linux-c7-jpeg SUBDIR += linux-c7-png SUBDIR += linux-c7-sdl_image SUBDIR += linux-c7-sdl_ttf SUBDIR += linux-c7-tiff SUBDIR += llpp SUBDIR += lprof-devel SUBDIR += lua-gd SUBDIR += luminance SUBDIR += luminance-qt5 SUBDIR += luxrender SUBDIR += luxrender14 SUBDIR += lximage-qt SUBDIR += lximageqt-l10n SUBDIR += mahotas SUBDIR += maim SUBDIR += makehuman SUBDIR += mandelbulber SUBDIR += mapcache SUBDIR += mapnik SUBDIR += mapserver SUBDIR += mapyrus SUBDIR += megapov SUBDIR += mesa-demos SUBDIR += meshviewer SUBDIR += metacam SUBDIR += metapixel SUBDIR += mhgui SUBDIR += ming SUBDIR += mirage SUBDIR += mitsuba SUBDIR += mmrecover SUBDIR += movit SUBDIR += mozjpeg SUBDIR += mscgen SUBDIR += mtpaint SUBDIR += multican SUBDIR += mupdf SUBDIR += mxp SUBDIR += mypaint SUBDIR += nathive SUBDIR += netpbm SUBDIR += nip2 SUBDIR += nomacs SUBDIR += nplot SUBDIR += npretty SUBDIR += nurbs++ SUBDIR += nvidia-texture-tools SUBDIR += ocaml-images SUBDIR += ocaml-lablgl SUBDIR += ocrad SUBDIR += ocre SUBDIR += ocropus SUBDIR += ogre3d SUBDIR += okular SUBDIR += opencollada SUBDIR += opencolorio SUBDIR += opencolorio-tools SUBDIR += opencsg SUBDIR += opencv2 SUBDIR += opencv2-core SUBDIR += opencv2-java SUBDIR += opendx SUBDIR += opengl-man SUBDIR += opengtl SUBDIR += openimageio SUBDIR += openjpeg SUBDIR += openjpeg15 SUBDIR += openjump SUBDIR += opennurbs SUBDIR += openrm SUBDIR += openshadinglanguage SUBDIR += opensubdiv SUBDIR += optar SUBDIR += optipng SUBDIR += osg SUBDIR += osg-devel SUBDIR += osgearth SUBDIR += oyranos SUBDIR += p5-Acme-Steganography-Image-Png SUBDIR += p5-Barcode-ZBar SUBDIR += p5-CAD-Drawing SUBDIR += p5-CAD-Drawing-Template SUBDIR += p5-Cairo SUBDIR += p5-Captcha-reCAPTCHA SUBDIR += p5-Captcha-reCAPTCHA-Mailhide SUBDIR += p5-Chart SUBDIR += p5-Chart-Clicker SUBDIR += p5-Chart-Gnuplot SUBDIR += p5-Chart-Graph SUBDIR += p5-Chart-PNGgraph SUBDIR += p5-Color-Calc SUBDIR += p5-Color-Library SUBDIR += p5-Color-Palette SUBDIR += p5-Color-Rgb SUBDIR += p5-Color-Scheme SUBDIR += p5-Convert-Color SUBDIR += p5-Data-Google-Visualization-DataSource SUBDIR += p5-Data-Google-Visualization-DataTable SUBDIR += p5-GD SUBDIR += p5-GD-Arrow SUBDIR += p5-GD-Barcode SUBDIR += p5-GD-Graph SUBDIR += p5-GD-Graph-histogram SUBDIR += p5-GD-Graph-ohlc SUBDIR += p5-GD-Graph3d SUBDIR += p5-GD-SVG SUBDIR += p5-GD-TextUtil SUBDIR += p5-GD-Thumbnail SUBDIR += p5-Geo-EOP SUBDIR += p5-Geo-GDAL SUBDIR += p5-Geo-GML SUBDIR += p5-Geo-Gpx SUBDIR += p5-Geo-Point SUBDIR += p5-Geo-Proj4 SUBDIR += p5-Geometry-Primitive SUBDIR += p5-Gimp SUBDIR += p5-Google-Chart SUBDIR += p5-Graph-Easy SUBDIR += p5-Graph-ReadWrite SUBDIR += p5-Graph-SocialMap SUBDIR += p5-Graph-Writer-GraphViz SUBDIR += p5-GraphViz SUBDIR += p5-GraphViz-Data-Structure SUBDIR += p5-GraphViz-Traverse SUBDIR += p5-GraphViz2 SUBDIR += p5-Graphics-Color SUBDIR += p5-Graphics-ColorNames SUBDIR += p5-Graphics-ColorNames-WWW SUBDIR += p5-Graphics-GnuplotIF SUBDIR += p5-Graphics-Primitive SUBDIR += p5-Graphics-Primitive-Driver-Cairo SUBDIR += p5-Image-Base SUBDIR += p5-Image-Base-SVG SUBDIR += p5-Image-Caa SUBDIR += p5-Image-Compare SUBDIR += p5-Image-ExifTool SUBDIR += p5-Image-ExifTool-devel SUBDIR += p5-Image-Grab SUBDIR += p5-Image-Heatmap SUBDIR += p5-Image-IPTCInfo SUBDIR += p5-Image-Imgur SUBDIR += p5-Image-Imlib2 SUBDIR += p5-Image-Info SUBDIR += p5-Image-LibExif SUBDIR += p5-Image-Magick-Iterator SUBDIR += p5-Image-Math-Constrain SUBDIR += p5-Image-MetaData-GQview SUBDIR += p5-Image-MetaData-JPEG SUBDIR += p5-Image-ObjectDetect SUBDIR += p5-Image-PBMlib SUBDIR += p5-Image-Pngslimmer SUBDIR += p5-Image-Scale SUBDIR += p5-Image-Size SUBDIR += p5-Image-Size-FillFullSelect SUBDIR += p5-Imager SUBDIR += p5-Imager-AverageGray SUBDIR += p5-Imager-Graph SUBDIR += p5-Imager-Plot SUBDIR += p5-Imager-QRCode SUBDIR += p5-Imlib2 SUBDIR += p5-Layout-Manager SUBDIR += p5-OpenGL SUBDIR += p5-PGPLOT SUBDIR += p5-SVG-DOM2 SUBDIR += p5-SVG-Graph SUBDIR += p5-SVG-Metadata SUBDIR += p5-SWF-Builder SUBDIR += p5-SWF-File SUBDIR += p5-Sane SUBDIR += p5-SpringGraph SUBDIR += p5-Tk-JPEG-Lite SUBDIR += p5-URI-GoogleChart SUBDIR += p5-VCG SUBDIR += p5-Visio SUBDIR += p5-feedgnuplot SUBDIR += p5-ming SUBDIR += panoglview SUBDIR += panomatic SUBDIR += partio SUBDIR += pdf2svg SUBDIR += pdfpc SUBDIR += pear-Horde_Image SUBDIR += pear-Image_3D SUBDIR += pear-Image_Barcode SUBDIR += pear-Image_Barcode2 SUBDIR += pear-Image_Canvas SUBDIR += pear-Image_Color SUBDIR += pear-Image_Graph SUBDIR += pear-Image_GraphViz SUBDIR += pear-Image_Transform SUBDIR += pecl-gmagick SUBDIR += pecl-imagick SUBDIR += pecl-imlib2 SUBDIR += pecl-qrencode SUBDIR += pecomato SUBDIR += pencil SUBDIR += peps SUBDIR += pfscalibration SUBDIR += pfstmo SUBDIR += pfstools SUBDIR += pgplot SUBDIR += pho SUBDIR += photivo SUBDIR += photopc SUBDIR += phototonic SUBDIR += php-facedetect SUBDIR += php-gdal SUBDIR += php-geos SUBDIR += php-libpuzzle SUBDIR += php-magickwand SUBDIR += php5-ffmpeg SUBDIR += php56-exif SUBDIR += php56-gd SUBDIR += php70-exif SUBDIR += php70-gd SUBDIR += php71-exif SUBDIR += php71-gd SUBDIR += phplot SUBDIR += picpuz SUBDIR += piddle SUBDIR += piglit SUBDIR += pikopixel SUBDIR += pinpoint SUBDIR += pixelize SUBDIR += pixen SUBDIR += pixie SUBDIR += pixmap SUBDIR += plasma-kmod SUBDIR += plotutils SUBDIR += png SUBDIR += png2html SUBDIR += png2ico SUBDIR += pngcheck SUBDIR += pngcrush SUBDIR += pngnq SUBDIR += pngquant SUBDIR += pngrewrite SUBDIR += pngwriter SUBDIR += podofo SUBDIR += polyclipping SUBDIR += poppler SUBDIR += poppler-data SUBDIR += poppler-glib SUBDIR += poppler-qt4 SUBDIR += poppler-qt5 SUBDIR += poppler-utils SUBDIR += potrace SUBDIR += povray-meta SUBDIR += povray36 SUBDIR += povray37 SUBDIR += ppmcaption SUBDIR += ppminfo SUBDIR += ppsei SUBDIR += pqiv SUBDIR += preview SUBDIR += price SUBDIR += prison SUBDIR += processing SUBDIR += proj SUBDIR += projectm-libvisual SUBDIR += pstoedit SUBDIR += pstoepsi SUBDIR += py-PyOpenGL SUBDIR += py-PyOpenGL-accelerate SUBDIR += py-PyX SUBDIR += py-PyX12 SUBDIR += py-actdiag SUBDIR += py-blockdiag SUBDIR += py-blockdiagcontrib-cisco SUBDIR += py-cairo SUBDIR += py-cairocffi SUBDIR += py-chart SUBDIR += py-django-easy-thumbnails SUBDIR += py-editobj SUBDIR += py-exif SUBDIR += py-exifread SUBDIR += py-exiv2 SUBDIR += py-freeimagepy SUBDIR += py-gchartwrapper SUBDIR += py-gd SUBDIR += py-gdal SUBDIR += py-gimp SUBDIR += py-glewpy SUBDIR += py-goocanvas SUBDIR += py-gphoto2 SUBDIR += py-graph SUBDIR += py-graph-core SUBDIR += py-graph-dot SUBDIR += py-graphy SUBDIR += py-gvgen SUBDIR += py-imageio SUBDIR += py-imagesize SUBDIR += py-imgurpython SUBDIR += py-leather SUBDIR += py-mayavi SUBDIR += py-mcomix SUBDIR += py-ming SUBDIR += py-nwdiag SUBDIR += py-opencolorio SUBDIR += py-opencv2 SUBDIR += py-openexr SUBDIR += py-openimageio SUBDIR += py-paint SUBDIR += py-pillow SUBDIR += py-pivy SUBDIR += py-plotly SUBDIR += py-png SUBDIR += py-poppler SUBDIR += py-poppler-qt4 SUBDIR += py-pycha SUBDIR += py-pydot SUBDIR += py-pygal SUBDIR += py-pyganim SUBDIR += py-pyggel SUBDIR += py-pyglet SUBDIR += py-pygooglechart SUBDIR += py-pygraphviz SUBDIR += py-pyproj SUBDIR += py-qt4-svg SUBDIR += py-qt5-svg SUBDIR += py-rabbyt SUBDIR += py-sane SUBDIR += py-seqdiag SUBDIR += py-sorl-thumbnail SUBDIR += py-soya3d SUBDIR += py-stltools SUBDIR += py-toyplot SUBDIR += py-traitsui SUBDIR += py-wand SUBDIR += py-webcolors SUBDIR += py3-cairo SUBDIR += py3-pillow SUBDIR += py3-pygraphviz SUBDIR += pygts SUBDIR += pymorph SUBDIR += pysvg SUBDIR += qcomicbook SUBDIR += qgis SUBDIR += qiv SUBDIR += qiviewer SUBDIR += qslim SUBDIR += qt4-iconengines SUBDIR += qt4-imageformats SUBDIR += qt4-opengl SUBDIR += qt4-pixeltool SUBDIR += qt4-svg SUBDIR += qt5-3d SUBDIR += qt5-graphicaleffects SUBDIR += qt5-imageformats SUBDIR += qt5-opengl SUBDIR += qt5-pixeltool SUBDIR += qt5-svg SUBDIR += qtawesome SUBDIR += qtgtl SUBDIR += quat SUBDIR += quat-gui SUBDIR += quesa SUBDIR += quesoglc SUBDIR += qxv SUBDIR += radius-engine SUBDIR += raster3d SUBDIR += rawstudio SUBDIR += rawtherapee SUBDIR += rawtherapee-devel SUBDIR += rayshade SUBDIR += reallyslick SUBDIR += recoverjpeg SUBDIR += renrot SUBDIR += repng2jpeg SUBDIR += rgbpaint SUBDIR += rigsofrods-caelum SUBDIR += rigsofrods-pagedgeometry SUBDIR += ristretto SUBDIR += ruby-gd SUBDIR += rubygem-cairo SUBDIR += rubygem-captcha SUBDIR += rubygem-chunky_png SUBDIR += rubygem-clutter SUBDIR += rubygem-clutter-gtk SUBDIR += rubygem-dragonfly SUBDIR += rubygem-emoji SUBDIR += rubygem-exifr SUBDIR += rubygem-ezprint SUBDIR += rubygem-fastimage SUBDIR += rubygem-flamegraph SUBDIR += rubygem-gd2 SUBDIR += rubygem-gdk_pixbuf2 SUBDIR += rubygem-gemojione SUBDIR += rubygem-geokit SUBDIR += rubygem-gitlab_emoji SUBDIR += rubygem-goocanvas SUBDIR += rubygem-gruff SUBDIR += rubygem-image_science SUBDIR += rubygem-imagesize SUBDIR += rubygem-mini_magick SUBDIR += rubygem-objectdetect SUBDIR += rubygem-opengl SUBDIR += rubygem-pdfkit SUBDIR += rubygem-png SUBDIR += rubygem-railroad SUBDIR += rubygem-rmagick SUBDIR += rubygem-rsvg2 SUBDIR += rubygem-ruby-graphviz SUBDIR += rubygem-scruffy SUBDIR += s10sh SUBDIR += s2tc SUBDIR += sage SUBDIR += sam2p SUBDIR += sampleicc SUBDIR += sane-backends SUBDIR += sane-epkowa SUBDIR += sane-frontends SUBDIR += scale2x SUBDIR += scantailor SUBDIR += scr2png SUBDIR += scrot SUBDIR += scwm-icons SUBDIR += sdl2_gfx SUBDIR += sdl2_image SUBDIR += sdl2_ttf SUBDIR += sdl_gfx SUBDIR += sdl_image SUBDIR += sdl_ttf SUBDIR += sdump SUBDIR += seam-carving-gui SUBDIR += seejpeg SUBDIR += seexpr SUBDIR += sekrit-twc-zimg SUBDIR += seom SUBDIR += separate SUBDIR += seq2gif SUBDIR += shared-color-profiles SUBDIR += sharpconstruct SUBDIR += shiva-collections SUBDIR += shotwell SUBDIR += showimage SUBDIR += silgraphite SUBDIR += simage SUBDIR += simpleviewer SUBDIR += sk1libs SUBDIR += skanlite SUBDIR += smillaenlarger SUBDIR += springgraph SUBDIR += squish SUBDIR += ssocr SUBDIR += sswf SUBDIR += stamp SUBDIR += structuresynth SUBDIR += svg2pdf SUBDIR += svg2png SUBDIR += svgalib SUBDIR += svgfig SUBDIR += swfdec SUBDIR += swfmill SUBDIR += swftools SUBDIR += sxiv SUBDIR += synaesthesia SUBDIR += synfigstudio SUBDIR += telak SUBDIR += tesseract SUBDIR += tesseract-data SUBDIR += tgif SUBDIR += tif22pnm SUBDIR += tiff SUBDIR += tiffgt SUBDIR += tifmerge SUBDIR += tilecache SUBDIR += tiled SUBDIR += timeless SUBDIR += tintfu SUBDIR += tinyows SUBDIR += tkpng SUBDIR += togl SUBDIR += truevision SUBDIR += ttygif SUBDIR += tulip SUBDIR += tumble SUBDIR += ufraw SUBDIR += uniconvertor SUBDIR += uniconvw SUBDIR += unpaper SUBDIR += urt SUBDIR += vapoursynth-waifu2x-w2xc SUBDIR += variety SUBDIR += vcg SUBDIR += viewnior SUBDIR += vigra SUBDIR += vips SUBDIR += visprint SUBDIR += volpack SUBDIR += vp SUBDIR += waffle SUBDIR += waifu2x-converter-cpp + SUBDIR += wayland SUBDIR += webp SUBDIR += wings SUBDIR += wmicons SUBDIR += wxsvg SUBDIR += xaos SUBDIR += xbmbrowser SUBDIR += xcftools SUBDIR += xd3d SUBDIR += xdgagrab SUBDIR += xface.el SUBDIR += xfig SUBDIR += xfpovray SUBDIR += xfractint SUBDIR += xglurbules SUBDIR += xgrasp SUBDIR += xli SUBDIR += xmandel SUBDIR += xmedcon SUBDIR += xmlgraphics-commons SUBDIR += xmountains SUBDIR += xnview SUBDIR += xoris SUBDIR += xournal SUBDIR += xpaint SUBDIR += xpdf SUBDIR += xpeps SUBDIR += xpx SUBDIR += xsane SUBDIR += xsvg SUBDIR += xtexcad SUBDIR += xv SUBDIR += xv-m17n SUBDIR += xwpick SUBDIR += yafray SUBDIR += yagf SUBDIR += yed SUBDIR += yukon SUBDIR += zathura SUBDIR += zathura-cb SUBDIR += zathura-djvu SUBDIR += zathura-pdf-mupdf SUBDIR += zathura-pdf-poppler SUBDIR += zathura-ps SUBDIR += zbar SUBDIR += zgv SUBDIR += zimg SUBDIR += zint SUBDIR += zphoto .include Index: head/graphics/wayland/Makefile =================================================================== --- head/graphics/wayland/Makefile (nonexistent) +++ head/graphics/wayland/Makefile (revision 432804) @@ -0,0 +1,47 @@ +# Created by: kwm@FreeBSD.org +# $FreeBSD$ + +# NOTE +# Changes made by kwm to use kevent instead of epoll +# are still in place. However, since libinput depends +# on libepoll-shim the simplest to do was to have Wayland +# also use it. Currently build will fail if epoll-shim +# is not available but can be built without epoll-shim +# if EPOLLSHIM_LIBS is cleared (configure.ac) +# +# TODO: Add condition for this in configure +# +# If we want to build Wayland with kwm's kevent patches +# and use epoll-shim for libinput we have to change it +# so that Wayland ignore epoll headers installed by +# epoll-shim. +# Maybe best is to use epoll-shim if it is good enough +# and keep diff with upstream minimal. + +PORTNAME= wayland +PORTVERSION= 1.12.0 +CATEGORIES= graphics wayland +MASTER_SITES= http://wayland.freedesktop.org/releases/ + +MAINTAINER= x11@FreeBSD.org +COMMENT= Wayland composite "server" + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libexpat.so:textproc/expat2 \ + libffi.so:devel/libffi \ + libepoll-shim.so:devel/libepoll-shim + +CFLAGS+= "-I${LOCALBASE}/include/libepoll-shim" + +WITH_DEBUG= 1 + +USES= autoreconf gmake libtool localbase pathfix pkgconfig tar:xz +USE_GNOME= libxslt:build +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-documentation +INSTALL_TARGET= install-strip + +.include Property changes on: head/graphics/wayland/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/distinfo =================================================================== --- head/graphics/wayland/distinfo (nonexistent) +++ head/graphics/wayland/distinfo (revision 432804) @@ -0,0 +1,3 @@ +TIMESTAMP = 1481659324 +SHA256 (wayland-1.12.0.tar.xz) = d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1 +SIZE (wayland-1.12.0.tar.xz) = 379520 Property changes on: head/graphics/wayland/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-Makefile.am =================================================================== --- head/graphics/wayland/files/patch-Makefile.am (nonexistent) +++ head/graphics/wayland/files/patch-Makefile.am (revision 432804) @@ -0,0 +1,29 @@ +--- Makefile.am.orig 2016-02-29 23:30:58 UTC ++++ Makefile.am +@@ -73,7 +73,7 @@ nodist_include_HEADERS = \ + protocol/wayland-client-protocol.h + + libwayland_server_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread +-libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm ++libwayland_server_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm + libwayland_server_la_LDFLAGS = -version-info 1:0:1 + libwayland_server_la_SOURCES = \ + src/wayland-server.c \ +@@ -85,7 +85,7 @@ nodist_libwayland_server_la_SOURCES = \ + protocol/wayland-protocol.c + + libwayland_client_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread +-libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm ++libwayland_client_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm + libwayland_client_la_LDFLAGS = -version-info 3:0:3 + libwayland_client_la_SOURCES = \ + src/wayland-client.c +@@ -186,7 +186,7 @@ libtest_runner_la_LIBADD = \ + libwayland-util.la \ + libwayland-client.la \ + libwayland-server.la \ +- -lrt -ldl $(FFI_LIBS) ++ -lrt $(DL_LIBS) $(FFI_LIBS) $(EPOLLSHIM_LIBS) + + + array_test_SOURCES = tests/array-test.c Property changes on: head/graphics/wayland/files/patch-Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-configure.ac =================================================================== --- head/graphics/wayland/files/patch-configure.ac (nonexistent) +++ head/graphics/wayland/files/patch-configure.ac (revision 432804) @@ -0,0 +1,56 @@ +--- configure.ac.orig 2016-06-01 00:11:10 UTC ++++ configure.ac +@@ -63,6 +63,28 @@ AC_SUBST(GCC_CFLAGS) + + AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate]) + ++AC_CHECK_HEADERS([sys/signalfd.h sys/timerfd.h]) ++ ++# Use epoll on Linux or kqueue on BSD ++AC_CHECK_HEADERS([sys/epoll.h sys/event.h]) ++if test "x$ac_cv_header_sys_epoll_h" != "xyes" && test "x$ac_cv_header_sys_event_h" != "xyes"; then ++ AC_MSG_ERROR([Can't find sys/epoll.h or sys/event.h. Please ensure either epoll or kqueue is available.]) ++fi ++ ++# Credential support on FreeBSD ++AC_CHECK_HEADERS([sys/ucred.h]) ++ ++# dlopen() ++AC_CHECK_LIB([dl], [dlsym], [DL_LIBS=-ldl]) ++AC_SUBST([DL_LIBS]) ++ ++# Defines __FreeBSD__ if we're on FreeBSD ++AC_CHECK_HEADERS([sys/param.h]) ++ ++# waitid() and signal.h are needed for the test suite. ++AC_CHECK_FUNCS([waitid]) ++AC_CHECK_HEADERS([signal.h]) ++ + AC_ARG_ENABLE([libraries], + [AC_HELP_STRING([--disable-libraries], + [Disable compilation of wayland libraries])], +@@ -98,11 +120,12 @@ AC_SUBST([ICONDIR]) + + if test "x$enable_libraries" = "xyes"; then + PKG_CHECK_MODULES(FFI, [libffi]) ++dnl convert SFD_CLOEXEC and TFD_CLOEXEC to warning while figuring out how to do this. + AC_CHECK_DECL(SFD_CLOEXEC,[], +- [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")], ++ [AC_MSG_WARN("SFD_CLOEXEC is needed to compile wayland libraries")], + [[#include ]]) + AC_CHECK_DECL(TFD_CLOEXEC,[], +- [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")], ++ [AC_MSG_WARN("TFD_CLOEXEC is needed to compile wayland libraries")], + [[#include ]]) + AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")], +@@ -110,6 +133,9 @@ if test "x$enable_libraries" = "xyes"; t + AC_CHECK_HEADERS([execinfo.h]) + fi + ++EPOLLSHIM_LIBS="-lepoll-shim" ++AC_SUBST(EPOLLSHIM_LIBS) ++ + PKG_CHECK_MODULES(EXPAT, [expat], [], + [AC_CHECK_HEADERS(expat.h, [], + [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) Property changes on: head/graphics/wayland/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-src_wayland-os.c =================================================================== --- head/graphics/wayland/files/patch-src_wayland-os.c (nonexistent) +++ head/graphics/wayland/files/patch-src_wayland-os.c (revision 432804) @@ -0,0 +1,114 @@ +--- src/wayland-os.c.orig 2015-07-06 19:38:51 UTC ++++ src/wayland-os.c +@@ -25,14 +25,20 @@ + + #define _GNU_SOURCE + ++#include "../config.h" ++ + #include + #include + #include + #include + #include ++#ifdef HAVE_SYS_EPOLL_H + #include ++#endif ++#ifdef HAVE_SYS_EVENT_H ++#include ++#endif + +-#include "../config.h" + #include "wayland-os.h" + + static int +@@ -62,26 +68,50 @@ wl_os_socket_cloexec(int domain, int typ + { + int fd; + ++#ifdef SOCK_CLOEXEC + fd = socket(domain, type | SOCK_CLOEXEC, protocol); + if (fd >= 0) + return fd; + if (errno != EINVAL) + return -1; ++#endif + + fd = socket(domain, type, protocol); + return set_cloexec_or_close(fd); + } + + int ++wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2]) ++{ ++ int retval; ++ ++#ifdef SOCK_CLOEXEC ++ retval = socketpair(domain, type | SOCK_CLOEXEC, protocol, sv); ++ if (retval >= 0) ++ return retval; ++ if (errno != EINVAL) ++ return -1; ++#endif ++ ++ retval = socketpair(domain, type, protocol, sv); ++ if (set_cloexec_or_close(sv[0]) < 0 || set_cloexec_or_close(sv[1]) < 0) ++ retval = -1; ++ ++ return retval; ++} ++ ++int + wl_os_dupfd_cloexec(int fd, long minfd) + { + int newfd; + ++#ifdef F_DUPFD_CLOEXEC + newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd); + if (newfd >= 0) + return newfd; + if (errno != EINVAL) + return -1; ++#endif + + newfd = fcntl(fd, F_DUPFD, minfd); + return set_cloexec_or_close(newfd); +@@ -123,15 +153,18 @@ wl_os_recvmsg_cloexec(int sockfd, struct + { + ssize_t len; + ++#ifdef MSG_CMSG_CLOEXEC + len = recvmsg(sockfd, msg, flags | MSG_CMSG_CLOEXEC); + if (len >= 0) + return len; + if (errno != EINVAL) + return -1; ++#endif + + return recvmsg_cloexec_fallback(sockfd, msg, flags); + } + ++#ifdef HAVE_SYS_EPOLL_H + int + wl_os_epoll_create_cloexec(void) + { +@@ -148,6 +181,19 @@ wl_os_epoll_create_cloexec(void) + fd = epoll_create(1); + return set_cloexec_or_close(fd); + } ++#endif ++ ++#ifdef HAVE_SYS_EVENT_H ++int ++wl_os_kqueue_create_cloexec(void) ++{ ++ int fd; ++ ++ fd = kqueue(); ++ ++ return set_cloexec_or_close(fd); ++} ++#endif + + int + wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen) Property changes on: head/graphics/wayland/files/patch-src_wayland-os.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-src_wayland-os.h =================================================================== --- head/graphics/wayland/files/patch-src_wayland-os.h (nonexistent) +++ head/graphics/wayland/files/patch-src_wayland-os.h (revision 432804) @@ -0,0 +1,28 @@ +--- src/wayland-os.h.orig 2015-07-06 19:38:51 UTC ++++ src/wayland-os.h +@@ -30,13 +30,25 @@ int + wl_os_socket_cloexec(int domain, int type, int protocol); + + int ++wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2]); ++ ++int + wl_os_dupfd_cloexec(int fd, long minfd); + + ssize_t + wl_os_recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags); + ++/* FIXME? not sure if this will work in this header like this ... ++ though seems build only header perhaps? */ ++#ifdef HAVE_SYS_EPOLL_H + int + wl_os_epoll_create_cloexec(void); ++#endif ++ ++#ifdef HAVE_SYS_EVENT_H ++int ++wl_os_kqueue_create_cloexec(void); ++#endif + + int + wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen); Property changes on: head/graphics/wayland/files/patch-src_wayland-os.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-src_wayland-server.c =================================================================== --- head/graphics/wayland/files/patch-src_wayland-server.c (nonexistent) +++ head/graphics/wayland/files/patch-src_wayland-server.c (revision 432804) @@ -0,0 +1,82 @@ +--- src/wayland-server.c.orig 2016-09-20 17:33:11.000000000 +0000 ++++ src/wayland-server.c 2016-12-13 20:07:06.878000000 +0000 +@@ -25,6 +25,8 @@ + + #define _GNU_SOURCE + ++#include "../config.h" ++ + #include + #include + #include +@@ -43,6 +45,11 @@ + #include + #include + ++#ifdef HAVE_SYS_UCRED_H ++#include ++#include ++#endif ++ + #include "wayland-util.h" + #include "wayland-private.h" + #include "wayland-server.h" +@@ -79,7 +86,13 @@ + struct wl_list link; + struct wl_map objects; + struct wl_signal destroy_signal; ++#ifdef HAVE_SYS_UCRED_H ++ /* FreeBSD */ ++ struct xucred xucred; ++#else ++ /* Linux */ + struct ucred ucred; ++#endif + int error; + struct wl_signal resource_created_signal; + }; +@@ -466,10 +479,20 @@ + if (!client->source) + goto err_client; + ++#if defined(SO_PEERCRED) ++ /* Linux */ + len = sizeof client->ucred; + if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, + &client->ucred, &len) < 0) + goto err_source; ++#elif defined(LOCAL_PEERCRED) ++ /* FreeBSD */ ++ len = sizeof client->xucred; ++ if (getsockopt(fd, SOL_SOCKET, LOCAL_PEERCRED, ++ &client->xucred, &len) < 0 || ++ client->xucred.cr_version != XUCRED_VERSION) ++ goto err_source; ++#endif + + client->connection = wl_connection_create(fd); + if (client->connection == NULL) +@@ -523,12 +546,23 @@ + wl_client_get_credentials(struct wl_client *client, + pid_t *pid, uid_t *uid, gid_t *gid) + { ++#ifdef HAVE_SYS_UCRED_H ++ /* FreeBSD */ ++ if (pid) ++ *pid = 0; /* FIXME: not defined on FreeBSD */ ++ if (uid) ++ *uid = client->xucred.cr_uid; ++ if (gid) ++ *gid = client->xucred.cr_gid; ++#else ++ /* Linux */ + if (pid) + *pid = client->ucred.pid; + if (uid) + *uid = client->ucred.uid; + if (gid) + *gid = client->ucred.gid; ++#endif + } + + /** Get the file descriptor for the client Property changes on: head/graphics/wayland/files/patch-src_wayland-server.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-src_wayland-shm.c =================================================================== --- head/graphics/wayland/files/patch-src_wayland-shm.c (nonexistent) +++ head/graphics/wayland/files/patch-src_wayland-shm.c (revision 432804) @@ -0,0 +1,147 @@ +--- src/wayland-shm.c.orig 2016-03-09 00:55:02 UTC ++++ src/wayland-shm.c +@@ -30,6 +30,8 @@ + + #define _GNU_SOURCE + ++#include "../config.h" ++ + #include + #include + #include +@@ -57,6 +59,9 @@ struct wl_shm_pool { + char *data; + int32_t size; + int32_t new_size; ++#ifdef HAVE_SYS_UCRED_H ++ int fd; ++#endif + }; + + struct wl_shm_buffer { +@@ -74,15 +79,24 @@ struct wl_shm_sigbus_data { + int fallback_mapping_used; + }; + ++static void *mremap_compat_maymove(void *, size_t, size_t, int, int, int); ++ + static void + shm_pool_finish_resize(struct wl_shm_pool *pool) + { + void *data; ++ int fd = -1; + + if (pool->size == pool->new_size) + return; + +- data = mremap(pool->data, pool->size, pool->new_size, MREMAP_MAYMOVE); ++#ifdef HAVE_SYS_UCRED_H ++ fd = pool->fd; ++#endif ++ ++ data = mremap_compat_maymove(pool->data, pool->size, pool->new_size, ++ PROT_READ | PROT_WRITE, MAP_SHARED, fd); ++ + if (data == MAP_FAILED) { + wl_resource_post_error(pool->resource, + WL_SHM_ERROR_INVALID_FD, +@@ -108,6 +122,10 @@ shm_pool_unref(struct wl_shm_pool *pool, + if (pool->internal_refcount + pool->external_refcount) + return; + ++#ifdef HAVE_SYS_UCRED_H ++ close(pool->fd); ++#endif ++ + munmap(pool->data, pool->size); + free(pool); + } +@@ -221,6 +239,73 @@ shm_pool_destroy(struct wl_client *clien + wl_resource_destroy(resource); + } + ++#ifdef HAVE_MREMAP ++static void * ++mremap_compat_maymove(void *old_address, size_t old_size, size_t new_size, ++ int old_prot, int old_flags, int old_fd) ++{ ++ return mremap(old_address, old_size, new_size, MREMAP_MAYMOVE); ++} ++#else ++static void * ++mremap_compat_maymove(void *old_address, size_t old_size, size_t new_size, ++ int old_prot, int old_flags, int old_fd) ++{ ++ /* FreeBSD doesn't support mremap() yet, so we have to emulate it. ++ * This assumes MREMAP_MAYMOVE is the only flag in use. */ ++ if (new_size == old_size) { ++ return old_address; ++ } else if (new_size < old_size) { ++ /* Shrinking: munmap() the spare region. */ ++ munmap(old_address + old_size, new_size - old_size); ++ return old_address; ++ } else { ++ void *ret; ++ ++ /* Growing. Try and mmap() the extra region at the end of ++ * our existing allocation. If that gets mapped in the ++ * wrong place, fall back to mmap()ing an entirely new ++ * region of new_size and copying the data across. */ ++ ret = mmap(old_address + old_size, new_size - old_size, ++ old_prot, old_flags, old_fd, 0); ++ ++/* FIXME TODO: msync() before munmap()? */ ++ if (ret == MAP_FAILED) { ++ /* Total failure! */ ++ return ret; ++ } else if (ret == old_address + old_size) { ++ /* Success. */ ++ return old_address; ++ } else if (ret != old_address + old_size) { ++ /* Partial failure. Fall back to mapping an ++ * entirely new region. Unmap the region we ++ * just mapped first. */ ++ munmap(ret, new_size - old_size); ++ ++ /* Map an entirely new region. */ ++ ret = mmap(NULL, new_size, ++ old_prot, old_flags, old_fd, 0); ++ if (ret == MAP_FAILED) { ++ /* Total failure! */ ++ return ret; ++ } ++ ++ /* Copy the old data across. Implicit assumption ++ * that the old and new regions don't overlap. */ ++ memcpy(ret, old_address, old_size); ++ ++ /* Unmap the old region. */ ++ munmap(old_address, old_size); ++ ++ return ret; ++ } ++ } ++ ++ /* Unreachable. */ ++ return MAP_FAILED; ++} ++#endif ++ + static void + shm_pool_resize(struct wl_client *client, struct wl_resource *resource, + int32_t size) +@@ -282,7 +367,14 @@ shm_create_pool(struct wl_client *client + "failed mmap fd %d", fd); + goto err_free; + } ++ ++#ifdef HAVE_SYS_UCRED_H ++ /* We need to keep the FD around on FreeBSD so we can implement ++ * mremap(). See: mremap_compat_maymove(). */ ++ pool->fd = fd; ++#else + close(fd); ++#endif + + pool->resource = + wl_resource_create(client, &wl_shm_pool_interface, 1, id); Property changes on: head/graphics/wayland/files/patch-src_wayland-shm.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_client-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_client-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_client-test.c (revision 432804) @@ -0,0 +1,19 @@ +--- tests/client-test.c.orig 2015-07-06 19:38:51 UTC ++++ tests/client-test.c +@@ -34,6 +34,7 @@ + #include + #include + ++#include "wayland-os.h" + #include "wayland-private.h" + #include "wayland-server.h" + #include "test-runner.h" +@@ -59,7 +60,7 @@ TEST(client_destroy_listener) + struct client_destroy_listener a, b; + int s[2]; + +- assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0); ++ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, s) == 0); + display = wl_display_create(); + assert(display); + client = wl_client_create(display, s[0]); Property changes on: head/graphics/wayland/files/patch-tests_client-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_connection-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_connection-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_connection-test.c (revision 432804) @@ -0,0 +1,29 @@ +--- tests/connection-test.c.orig 2016-02-17 01:13:16 UTC ++++ tests/connection-test.c +@@ -36,6 +36,7 @@ + #include + #include + ++#include "wayland-os.h" + #include "wayland-private.h" + #include "test-runner.h" + #include "test-compositor.h" +@@ -47,7 +48,7 @@ setup(int *s) + { + struct wl_connection *connection; + +- assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0); ++ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, s) == 0); + + connection = wl_connection_create(s[0]); + assert(connection); +@@ -145,8 +146,7 @@ struct marshal_data { + static void + setup_marshal_data(struct marshal_data *data) + { +- assert(socketpair(AF_UNIX, +- SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); ++ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, data->s) == 0); + data->read_connection = wl_connection_create(data->s[0]); + assert(data->read_connection); + data->write_connection = wl_connection_create(data->s[1]); Property changes on: head/graphics/wayland/files/patch-tests_connection-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_event-loop-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_event-loop-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_event-loop-test.c (revision 432804) @@ -0,0 +1,40 @@ +--- tests/event-loop-test.c.orig 2015-07-06 19:38:51 UTC ++++ tests/event-loop-test.c +@@ -166,10 +166,10 @@ TEST(event_loop_signal) + signal_callback, &got_it); + assert(source); + +- wl_event_loop_dispatch(loop, 0); ++ assert(wl_event_loop_dispatch(loop, 0) == 0); + assert(!got_it); +- kill(getpid(), SIGUSR1); +- wl_event_loop_dispatch(loop, 0); ++ assert(kill(getpid(), SIGUSR1) == 0); ++ assert(wl_event_loop_dispatch(loop, 0) == 0); + assert(got_it == 1); + + wl_event_source_remove(source); +@@ -233,12 +233,20 @@ TEST(event_loop_timer) + + source = wl_event_loop_add_timer(loop, timer_callback, &got_it); + assert(source); +- wl_event_source_timer_update(source, 10); +- wl_event_loop_dispatch(loop, 0); ++ assert(wl_event_source_timer_update(source, 10) == 0); ++ assert(wl_event_loop_dispatch(loop, 0) == 0); + assert(!got_it); +- wl_event_loop_dispatch(loop, 20); ++ /* FreeBSD has a bug where it converts ms_timeout to ticks; it always adds 1 to the tick count. ++ * Consequently, we need to grossly overcompensate here. ++ * See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2012-07/msg00319.html */ ++ assert(wl_event_loop_dispatch(loop, 50) == 0); + assert(got_it == 1); + ++ /* Check it doesn't fire again. */ ++ got_it = 0; ++ assert(wl_event_loop_dispatch(loop, 20) == 0); ++ assert(!got_it); ++ + wl_event_source_remove(source); + wl_event_loop_destroy(loop); + } Property changes on: head/graphics/wayland/files/patch-tests_event-loop-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_os-wrappers-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_os-wrappers-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_os-wrappers-test.c (revision 432804) @@ -0,0 +1,185 @@ +--- tests/os-wrappers-test.c.orig 2015-07-06 19:38:51 UTC ++++ tests/os-wrappers-test.c +@@ -26,6 +26,8 @@ + + #define _GNU_SOURCE + ++#include "../config.h" ++ + #include + #include + #include +@@ -37,7 +39,13 @@ + #include + #include + #include ++ ++#ifdef HAVE_SYS_EPOLL_H + #include ++#elif HAVE_SYS_EVENT_H ++#include ++#include ++#endif + + #include "wayland-private.h" + #include "test-runner.h" +@@ -54,8 +62,13 @@ static int wrapped_calls_fcntl; + static ssize_t (*real_recvmsg)(int, struct msghdr *, int); + static int wrapped_calls_recvmsg; + ++#ifdef HAVE_SYS_EPOLL_H + static int (*real_epoll_create1)(int); + static int wrapped_calls_epoll_create1; ++#elif HAVE_SYS_EVENT_H ++static int (*real_kqueue)(void); ++static int wrapped_calls_kqueue; ++#endif + + static void + init_fallbacks(int do_fallbacks) +@@ -64,7 +77,11 @@ init_fallbacks(int do_fallbacks) + real_socket = dlsym(RTLD_NEXT, "socket"); + real_fcntl = dlsym(RTLD_NEXT, "fcntl"); + real_recvmsg = dlsym(RTLD_NEXT, "recvmsg"); ++#ifdef HAVE_SYS_EPOLL_H + real_epoll_create1 = dlsym(RTLD_NEXT, "epoll_create1"); ++#elif HAVE_SYS_EVENT_H ++ real_kqueue = dlsym(RTLD_NEXT, "kqueue"); ++#endif + } + + __attribute__ ((visibility("default"))) int +@@ -72,10 +89,12 @@ socket(int domain, int type, int protoco + { + wrapped_calls_socket++; + ++#ifdef SOCK_CLOEXEC + if (fall_back && (type & SOCK_CLOEXEC)) { + errno = EINVAL; + return -1; + } ++#endif + + return real_socket(domain, type, protocol); + } +@@ -88,10 +107,12 @@ fcntl(int fd, int cmd, ...) + + wrapped_calls_fcntl++; + ++#ifdef F_DUPFD_CLOEXEC + if (fall_back && (cmd == F_DUPFD_CLOEXEC)) { + errno = EINVAL; + return -1; + } ++#endif + + va_start(ap, cmd); + arg = va_arg(ap, void*); +@@ -105,14 +126,17 @@ recvmsg(int sockfd, struct msghdr *msg, + { + wrapped_calls_recvmsg++; + ++#ifdef MSG_CMSG_CLOEXEC + if (fall_back && (flags & MSG_CMSG_CLOEXEC)) { + errno = EINVAL; + return -1; + } ++#endif + + return real_recvmsg(sockfd, msg, flags); + } + ++#ifdef HAVE_SYS_EPOLL_H + __attribute__ ((visibility("default"))) int + epoll_create1(int flags) + { +@@ -126,6 +150,15 @@ epoll_create1(int flags) + + return real_epoll_create1(flags); + } ++#elif HAVE_SYS_EVENT_H ++__attribute__ ((visibility("default"))) int ++kqueue(void) ++{ ++ wrapped_calls_kqueue++; ++ ++ return real_kqueue(); ++} ++#endif + + static void + do_os_wrappers_socket_cloexec(int n) +@@ -155,12 +188,14 @@ TEST(os_wrappers_socket_cloexec) + do_os_wrappers_socket_cloexec(0); + } + ++#ifdef SOCK_CLOEXEC + TEST(os_wrappers_socket_cloexec_fallback) + { + /* forced fallback */ + init_fallbacks(1); + do_os_wrappers_socket_cloexec(1); + } ++#endif + + static void + do_os_wrappers_dupfd_cloexec(int n) +@@ -194,11 +229,13 @@ TEST(os_wrappers_dupfd_cloexec) + do_os_wrappers_dupfd_cloexec(0); + } + ++#ifdef F_DUPFD_CLOEXEC + TEST(os_wrappers_dupfd_cloexec_fallback) + { + init_fallbacks(1); + do_os_wrappers_dupfd_cloexec(3); + } ++#endif + + struct marshal_data { + struct wl_connection *read_connection; +@@ -217,8 +254,7 @@ struct marshal_data { + static void + setup_marshal_data(struct marshal_data *data) + { +- assert(socketpair(AF_UNIX, +- SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); ++ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, data->s) == 0); + + data->read_connection = wl_connection_create(data->s[0]); + assert(data->read_connection); +@@ -327,11 +363,13 @@ TEST(os_wrappers_recvmsg_cloexec) + do_os_wrappers_recvmsg_cloexec(0); + } + ++#ifdef MSG_CMSG_CLOEXEC + TEST(os_wrappers_recvmsg_cloexec_fallback) + { + init_fallbacks(1); + do_os_wrappers_recvmsg_cloexec(1); + } ++#endif + + static void + do_os_wrappers_epoll_create_cloexec(int n) +@@ -341,12 +379,20 @@ do_os_wrappers_epoll_create_cloexec(int + + nr_fds = count_open_fds(); + ++#ifdef HAVE_SYS_EPOLL_H + fd = wl_os_epoll_create_cloexec(); ++#elif HAVE_SYS_EVENT_H ++ fd = wl_os_kqueue_create_cloexec(); ++#endif + assert(fd >= 0); + + #ifdef EPOLL_CLOEXEC ++#ifdef HAVE_SYS_EPOLL_H + assert(wrapped_calls_epoll_create1 == n); + #else ++ assert(wrapped_calls_kqueue == n); ++#endif ++#else + printf("No epoll_create1.\n"); + #endif + Property changes on: head/graphics/wayland/files/patch-tests_os-wrappers-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_queue-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_queue-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_queue-test.c (revision 432804) @@ -0,0 +1,21 @@ +--- tests/queue-test.c.orig 2016-04-29 23:36:09 UTC ++++ tests/queue-test.c +@@ -23,6 +23,8 @@ + * SOFTWARE. + */ + ++#include "../config.h" ++ + #include + #include + #include +@@ -30,6 +32,9 @@ + #include + #include + #include ++#ifdef HAVE_SIGNAL_H ++#include ++#endif + + #include "wayland-client.h" + #include "wayland-server.h" Property changes on: head/graphics/wayland/files/patch-tests_queue-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_sanity-test.c =================================================================== --- head/graphics/wayland/files/patch-tests_sanity-test.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_sanity-test.c (revision 432804) @@ -0,0 +1,22 @@ +--- tests/sanity-test.c.orig 2016-02-17 01:13:16 UTC ++++ tests/sanity-test.c +@@ -92,7 +92,8 @@ FAIL_TEST(sanity_malloc_direct) + TEST(disable_leak_checks) + { + volatile void *mem; +- assert(leak_check_enabled); ++// XXX FreeBSD disables leak checks... ++// assert(leak_check_enabled); + /* normally this should be on the beginning of the test. + * Here we need to be sure, that the leak checks are + * turned on */ +@@ -171,7 +172,8 @@ sanity_fd_no_leak(void) + { + int fd[2]; + +- assert(leak_check_enabled); ++// XXX FreeBSD leak checks are disabled ++// assert(leak_check_enabled); + + /* leak 2 file descriptors */ + if (pipe(fd) < 0) Property changes on: head/graphics/wayland/files/patch-tests_sanity-test.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_test-helpers.c =================================================================== --- head/graphics/wayland/files/patch-tests_test-helpers.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_test-helpers.c (revision 432804) @@ -0,0 +1,52 @@ +--- tests/test-helpers.c.orig 2015-07-06 19:38:51 UTC ++++ tests/test-helpers.c +@@ -23,6 +23,12 @@ + * SOFTWARE. + */ + ++#include "../config.h" ++ ++#ifdef HAVE_SYS_PARAM_H ++#include ++#endif ++ + #include + #include + #include +@@ -32,6 +38,16 @@ + + #include "test-runner.h" + ++#ifdef __FreeBSD__ ++/* FreeBSD uses fdescfs (which must be mounted using: ++ * mount -t fdescfs fdescfs /dev/fd ++ * before the test suite can be run). */ ++#define OPEN_FDS_DIR "/dev/fd" ++#else ++/* Linux. */ ++#define OPEN_FDS_DIR "/proc/self/fd" ++#endif ++ + int + count_open_fds(void) + { +@@ -39,8 +55,8 @@ count_open_fds(void) + struct dirent *ent; + int count = 0; + +- dir = opendir("/proc/self/fd"); +- assert(dir && "opening /proc/self/fd failed."); ++ dir = opendir(OPEN_FDS_DIR); ++ assert(dir && "opening " OPEN_FDS_DIR " failed."); + + errno = 0; + while ((ent = readdir(dir))) { +@@ -49,7 +65,7 @@ count_open_fds(void) + continue; + count++; + } +- assert(errno == 0 && "reading /proc/self/fd failed."); ++ assert(errno == 0 && "reading " OPEN_FDS_DIR " failed."); + + closedir(dir); + Property changes on: head/graphics/wayland/files/patch-tests_test-helpers.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/files/patch-tests_test-runner.c =================================================================== --- head/graphics/wayland/files/patch-tests_test-runner.c (nonexistent) +++ head/graphics/wayland/files/patch-tests_test-runner.c (revision 432804) @@ -0,0 +1,170 @@ +--- tests/test-runner.c.orig 2016-05-03 00:46:35 UTC ++++ tests/test-runner.c +@@ -25,6 +25,12 @@ + + #define _GNU_SOURCE + ++#include "../config.h" ++ ++#ifdef HAVE_SYS_PARAM_H ++#include ++#endif ++ + #include + #include + #include +@@ -37,18 +43,35 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#endif + #ifndef PR_SET_PTRACER + # define PR_SET_PTRACER 0x59616d61 + #endif ++#include + + #include "test-runner.h" + + static int num_alloc; ++ ++extern const struct test __start_test_section, __stop_test_section; ++ ++/* This is all disabled for FreeBSD because it gives "can't allocate initial ++ * thread" aborts otherwise. */ ++#ifndef __FreeBSD__ + static void* (*sys_malloc)(size_t); + static void (*sys_free)(void*); + static void* (*sys_realloc)(void*, size_t); + static void* (*sys_calloc)(size_t, size_t); ++#endif ++ ++#ifdef __FreeBSD__ ++/* XXX review ptrace() usage */ ++#define PTRACE_ATTACH PT_ATTACH ++#define PTRACE_CONT PT_CONTINUE ++#define PTRACE_DETACH PT_DETACH ++#endif + + /* when set to 1, check if tests are not leaking memory and opened files. + * It is turned on by default. It can be turned off by +@@ -57,7 +80,7 @@ int leak_check_enabled; + + /* when this var is set to 0, every call to test_set_timeout() is + * suppressed - handy when debugging the test. Can be set by +- * WAYLAND_TEST_NO_TIMEOUTS environment variable. */ ++ * WAYLAND_TESTS_NO_TIMEOUTS evnironment var */ + static int timeouts_enabled = 1; + + /* set to one if the output goes to the terminal */ +@@ -65,6 +88,7 @@ static int is_atty = 0; + + extern const struct test __start_test_section, __stop_test_section; + ++#ifndef __FreeBSD__ + __attribute__ ((visibility("default"))) void * + malloc(size_t size) + { +@@ -98,6 +122,7 @@ calloc(size_t nmemb, size_t size) + + return sys_calloc(nmemb, size); + } ++#endif + + static const struct test * + find_test(const char *name) +@@ -291,6 +316,8 @@ is_debugger_attached(void) + return 0; + } + ++ ++// xxx start here + pid = fork(); + if (pid == -1) { + perror("fork"); +@@ -311,7 +338,7 @@ is_debugger_attached(void) + _exit(1); + if (!waitpid(-1, NULL, 0)) + _exit(1); +- ptrace(PTRACE_CONT, NULL, NULL); ++ ptrace(PTRACE_CONT, ppid, NULL, NULL); + ptrace(PTRACE_DETACH, ppid, NULL, NULL); + _exit(0); + } else { +@@ -345,17 +372,19 @@ int main(int argc, char *argv[]) + const struct test *t; + pid_t pid; + int total, pass; ++#ifdef HAVE_WAITID + siginfo_t info; ++#else ++ int status; ++#endif + ++#ifndef __FreeBSD__ + /* Load system malloc, free, and realloc */ + sys_calloc = dlsym(RTLD_NEXT, "calloc"); + sys_realloc = dlsym(RTLD_NEXT, "realloc"); + sys_malloc = dlsym(RTLD_NEXT, "malloc"); + sys_free = dlsym(RTLD_NEXT, "free"); + +- if (isatty(fileno(stderr))) +- is_atty = 1; +- + if (is_debugger_attached()) { + leak_check_enabled = 0; + timeouts_enabled = 0; +@@ -363,6 +392,16 @@ int main(int argc, char *argv[]) + leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK"); + timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS"); + } ++#else ++ /* Disable leak checking on FreeBSD since we can't override malloc(). */ ++ leak_check_enabled = 0; ++ /* XXX review later */ ++ timeouts_enabled = 0; ++#endif ++ ++ if (isatty(fileno(stderr))) ++ is_atty = 1; ++ + + if (argc == 2 && strcmp(argv[1], "--help") == 0) + usage(argv[0], EXIT_SUCCESS); +@@ -394,7 +433,8 @@ int main(int argc, char *argv[]) + if (pid == 0) + run_test(t); /* never returns */ + +- if (waitid(P_PID, pid, &info, WEXITED)) { ++#ifdef HAVE_WAITID ++ if (waitid(P_PID, 0, &info, WEXITED)) { + stderr_set_color(RED); + fprintf(stderr, "waitid failed: %m\n"); + stderr_reset_color(); +@@ -425,6 +465,25 @@ int main(int argc, char *argv[]) + + break; + } ++#else ++ if (waitpid(-1, &status, 0) == -1) { ++ fprintf(stderr, "waitpid failed: %s\n", ++ strerror(errno)); ++ abort(); ++ } ++ ++ fprintf(stderr, "test \"%s\":\t", t->name); ++ if (WIFEXITED(status)) { ++ fprintf(stderr, "exit status %d", WEXITSTATUS(status)); ++ if (WEXITSTATUS(status) == EXIT_SUCCESS) ++ success = 1; ++ } else if (WIFSIGNALED(status)) { ++ fprintf(stderr, "signal %d", WTERMSIG(status)); ++ } ++#endif ++ ++ if (t->must_fail) ++ success = !success; + + if (success) { + pass++; Property changes on: head/graphics/wayland/files/patch-tests_test-runner.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/pkg-descr =================================================================== --- head/graphics/wayland/pkg-descr (nonexistent) +++ head/graphics/wayland/pkg-descr (revision 432804) @@ -0,0 +1,13 @@ +Wayland is intended as a simpler replacement for X, easier to develop and +maintain. GNOME and KDE are expected to be ported to it. + +Wayland is a protocol for a compositor to talk to its clients as well as +a C library implementation of that protocol. The compositor can be a +standalone display server running on Linux kernel modesetting and evdev +input devices, an X application, or a wayland client itself. The clients can +be traditional applications, X servers (rootless or fullscreen) or other +display servers. + +Please report bugs to the FreeBSD bugtracker! + +WWW: http://wayland.freedesktop.org/ Property changes on: head/graphics/wayland/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/wayland/pkg-plist =================================================================== --- head/graphics/wayland/pkg-plist (nonexistent) +++ head/graphics/wayland/pkg-plist (revision 432804) @@ -0,0 +1,32 @@ +bin/wayland-scanner +include/wayland-client-core.h +include/wayland-client-protocol.h +include/wayland-client.h +include/wayland-cursor.h +include/wayland-egl-core.h +include/wayland-egl.h +include/wayland-server-core.h +include/wayland-server-protocol.h +include/wayland-server.h +include/wayland-util.h +include/wayland-version.h +lib/libwayland-client.a +lib/libwayland-client.so +lib/libwayland-client.so.0 +lib/libwayland-client.so.0.3.0 +lib/libwayland-cursor.a +lib/libwayland-cursor.so +lib/libwayland-cursor.so.0 +lib/libwayland-cursor.so.0.0.0 +lib/libwayland-server.a +lib/libwayland-server.so +lib/libwayland-server.so.0 +lib/libwayland-server.so.0.1.0 +libdata/pkgconfig/wayland-client.pc +libdata/pkgconfig/wayland-cursor.pc +libdata/pkgconfig/wayland-scanner.pc +libdata/pkgconfig/wayland-server.pc +share/aclocal/wayland-scanner.m4 +%%DATADIR%%/wayland-scanner.mk +%%DATADIR%%/wayland.dtd +%%DATADIR%%/wayland.xml Property changes on: head/graphics/wayland/pkg-plist ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/wayland/pkg-descr =================================================================== --- head/x11-servers/wayland/pkg-descr (revision 432803) +++ head/x11-servers/wayland/pkg-descr (nonexistent) @@ -1,13 +0,0 @@ -Wayland is intended as a simpler replacement for X, easier to develop and -maintain. GNOME and KDE are expected to be ported to it. - -Wayland is a protocol for a compositor to talk to its clients as well as -a C library implementation of that protocol. The compositor can be a -standalone display server running on Linux kernel modesetting and evdev -input devices, an X application, or a wayland client itself. The clients can -be traditional applications, X servers (rootless or fullscreen) or other -display servers. - -Please report bugs to the FreeBSD bugtracker! - -WWW: http://wayland.freedesktop.org/ Property changes on: head/x11-servers/wayland/pkg-descr ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/distinfo =================================================================== --- head/x11-servers/wayland/distinfo (revision 432803) +++ head/x11-servers/wayland/distinfo (nonexistent) @@ -1,3 +0,0 @@ -TIMESTAMP = 1481659324 -SHA256 (wayland-1.12.0.tar.xz) = d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1 -SIZE (wayland-1.12.0.tar.xz) = 379520 Property changes on: head/x11-servers/wayland/distinfo ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/pkg-plist =================================================================== --- head/x11-servers/wayland/pkg-plist (revision 432803) +++ head/x11-servers/wayland/pkg-plist (nonexistent) @@ -1,32 +0,0 @@ -bin/wayland-scanner -include/wayland-client-core.h -include/wayland-client-protocol.h -include/wayland-client.h -include/wayland-cursor.h -include/wayland-egl-core.h -include/wayland-egl.h -include/wayland-server-core.h -include/wayland-server-protocol.h -include/wayland-server.h -include/wayland-util.h -include/wayland-version.h -lib/libwayland-client.a -lib/libwayland-client.so -lib/libwayland-client.so.0 -lib/libwayland-client.so.0.3.0 -lib/libwayland-cursor.a -lib/libwayland-cursor.so -lib/libwayland-cursor.so.0 -lib/libwayland-cursor.so.0.0.0 -lib/libwayland-server.a -lib/libwayland-server.so -lib/libwayland-server.so.0 -lib/libwayland-server.so.0.1.0 -libdata/pkgconfig/wayland-client.pc -libdata/pkgconfig/wayland-cursor.pc -libdata/pkgconfig/wayland-scanner.pc -libdata/pkgconfig/wayland-server.pc -share/aclocal/wayland-scanner.m4 -%%DATADIR%%/wayland-scanner.mk -%%DATADIR%%/wayland.dtd -%%DATADIR%%/wayland.xml Property changes on: head/x11-servers/wayland/pkg-plist ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/Makefile =================================================================== --- head/x11-servers/wayland/Makefile (revision 432803) +++ head/x11-servers/wayland/Makefile (nonexistent) @@ -1,47 +0,0 @@ -# Created by: kwm@FreeBSD.org -# $FreeBSD$ - -# NOTE -# Changes made by kwm to use kevent instead of epoll -# are still in place. However, since libinput depends -# on libepoll-shim the simplest to do was to have Wayland -# also use it. Currently build will fail if epoll-shim -# is not available but can be built without epoll-shim -# if EPOLLSHIM_LIBS is cleared (configure.ac) -# -# TODO: Add condition for this in configure -# -# If we want to build Wayland with kwm's kevent patches -# and use epoll-shim for libinput we have to change it -# so that Wayland ignore epoll headers installed by -# epoll-shim. -# Maybe best is to use epoll-shim if it is good enough -# and keep diff with upstream minimal. - -PORTNAME= wayland -PORTVERSION= 1.12.0 -CATEGORIES= x11-servers wayland -MASTER_SITES= http://wayland.freedesktop.org/releases/ - -MAINTAINER= x11@FreeBSD.org -COMMENT= Wayland composite "server" - -LICENSE= MIT -LICENSE_FILE= ${WRKSRC}/COPYING - -LIB_DEPENDS= libexpat.so:textproc/expat2 \ - libffi.so:devel/libffi \ - libepoll-shim.so:devel/libepoll-shim - -CFLAGS+= "-I${LOCALBASE}/include/libepoll-shim" - -WITH_DEBUG= 1 - -USES= autoreconf gmake libtool localbase pathfix pkgconfig tar:xz -USE_GNOME= libxslt:build -USE_LDCONFIG= yes -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-documentation -INSTALL_TARGET= install-strip - -.include Property changes on: head/x11-servers/wayland/Makefile ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-configure.ac =================================================================== --- head/x11-servers/wayland/files/patch-configure.ac (revision 432803) +++ head/x11-servers/wayland/files/patch-configure.ac (nonexistent) @@ -1,56 +0,0 @@ ---- configure.ac.orig 2016-06-01 00:11:10 UTC -+++ configure.ac -@@ -63,6 +63,28 @@ AC_SUBST(GCC_CFLAGS) - - AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate]) - -+AC_CHECK_HEADERS([sys/signalfd.h sys/timerfd.h]) -+ -+# Use epoll on Linux or kqueue on BSD -+AC_CHECK_HEADERS([sys/epoll.h sys/event.h]) -+if test "x$ac_cv_header_sys_epoll_h" != "xyes" && test "x$ac_cv_header_sys_event_h" != "xyes"; then -+ AC_MSG_ERROR([Can't find sys/epoll.h or sys/event.h. Please ensure either epoll or kqueue is available.]) -+fi -+ -+# Credential support on FreeBSD -+AC_CHECK_HEADERS([sys/ucred.h]) -+ -+# dlopen() -+AC_CHECK_LIB([dl], [dlsym], [DL_LIBS=-ldl]) -+AC_SUBST([DL_LIBS]) -+ -+# Defines __FreeBSD__ if we're on FreeBSD -+AC_CHECK_HEADERS([sys/param.h]) -+ -+# waitid() and signal.h are needed for the test suite. -+AC_CHECK_FUNCS([waitid]) -+AC_CHECK_HEADERS([signal.h]) -+ - AC_ARG_ENABLE([libraries], - [AC_HELP_STRING([--disable-libraries], - [Disable compilation of wayland libraries])], -@@ -98,11 +120,12 @@ AC_SUBST([ICONDIR]) - - if test "x$enable_libraries" = "xyes"; then - PKG_CHECK_MODULES(FFI, [libffi]) -+dnl convert SFD_CLOEXEC and TFD_CLOEXEC to warning while figuring out how to do this. - AC_CHECK_DECL(SFD_CLOEXEC,[], -- [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland libraries")], -+ [AC_MSG_WARN("SFD_CLOEXEC is needed to compile wayland libraries")], - [[#include ]]) - AC_CHECK_DECL(TFD_CLOEXEC,[], -- [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland libraries")], -+ [AC_MSG_WARN("TFD_CLOEXEC is needed to compile wayland libraries")], - [[#include ]]) - AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland libraries")], -@@ -110,6 +133,9 @@ if test "x$enable_libraries" = "xyes"; t - AC_CHECK_HEADERS([execinfo.h]) - fi - -+EPOLLSHIM_LIBS="-lepoll-shim" -+AC_SUBST(EPOLLSHIM_LIBS) -+ - PKG_CHECK_MODULES(EXPAT, [expat], [], - [AC_CHECK_HEADERS(expat.h, [], - [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) Property changes on: head/x11-servers/wayland/files/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_event-loop-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_event-loop-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_event-loop-test.c (nonexistent) @@ -1,40 +0,0 @@ ---- tests/event-loop-test.c.orig 2015-07-06 19:38:51 UTC -+++ tests/event-loop-test.c -@@ -166,10 +166,10 @@ TEST(event_loop_signal) - signal_callback, &got_it); - assert(source); - -- wl_event_loop_dispatch(loop, 0); -+ assert(wl_event_loop_dispatch(loop, 0) == 0); - assert(!got_it); -- kill(getpid(), SIGUSR1); -- wl_event_loop_dispatch(loop, 0); -+ assert(kill(getpid(), SIGUSR1) == 0); -+ assert(wl_event_loop_dispatch(loop, 0) == 0); - assert(got_it == 1); - - wl_event_source_remove(source); -@@ -233,12 +233,20 @@ TEST(event_loop_timer) - - source = wl_event_loop_add_timer(loop, timer_callback, &got_it); - assert(source); -- wl_event_source_timer_update(source, 10); -- wl_event_loop_dispatch(loop, 0); -+ assert(wl_event_source_timer_update(source, 10) == 0); -+ assert(wl_event_loop_dispatch(loop, 0) == 0); - assert(!got_it); -- wl_event_loop_dispatch(loop, 20); -+ /* FreeBSD has a bug where it converts ms_timeout to ticks; it always adds 1 to the tick count. -+ * Consequently, we need to grossly overcompensate here. -+ * See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2012-07/msg00319.html */ -+ assert(wl_event_loop_dispatch(loop, 50) == 0); - assert(got_it == 1); - -+ /* Check it doesn't fire again. */ -+ got_it = 0; -+ assert(wl_event_loop_dispatch(loop, 20) == 0); -+ assert(!got_it); -+ - wl_event_source_remove(source); - wl_event_loop_destroy(loop); - } Property changes on: head/x11-servers/wayland/files/patch-tests_event-loop-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-src_wayland-os.h =================================================================== --- head/x11-servers/wayland/files/patch-src_wayland-os.h (revision 432803) +++ head/x11-servers/wayland/files/patch-src_wayland-os.h (nonexistent) @@ -1,28 +0,0 @@ ---- src/wayland-os.h.orig 2015-07-06 19:38:51 UTC -+++ src/wayland-os.h -@@ -30,13 +30,25 @@ int - wl_os_socket_cloexec(int domain, int type, int protocol); - - int -+wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2]); -+ -+int - wl_os_dupfd_cloexec(int fd, long minfd); - - ssize_t - wl_os_recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags); - -+/* FIXME? not sure if this will work in this header like this ... -+ though seems build only header perhaps? */ -+#ifdef HAVE_SYS_EPOLL_H - int - wl_os_epoll_create_cloexec(void); -+#endif -+ -+#ifdef HAVE_SYS_EVENT_H -+int -+wl_os_kqueue_create_cloexec(void); -+#endif - - int - wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen); Property changes on: head/x11-servers/wayland/files/patch-src_wayland-os.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_os-wrappers-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_os-wrappers-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_os-wrappers-test.c (nonexistent) @@ -1,185 +0,0 @@ ---- tests/os-wrappers-test.c.orig 2015-07-06 19:38:51 UTC -+++ tests/os-wrappers-test.c -@@ -26,6 +26,8 @@ - - #define _GNU_SOURCE - -+#include "../config.h" -+ - #include - #include - #include -@@ -37,7 +39,13 @@ - #include - #include - #include -+ -+#ifdef HAVE_SYS_EPOLL_H - #include -+#elif HAVE_SYS_EVENT_H -+#include -+#include -+#endif - - #include "wayland-private.h" - #include "test-runner.h" -@@ -54,8 +62,13 @@ static int wrapped_calls_fcntl; - static ssize_t (*real_recvmsg)(int, struct msghdr *, int); - static int wrapped_calls_recvmsg; - -+#ifdef HAVE_SYS_EPOLL_H - static int (*real_epoll_create1)(int); - static int wrapped_calls_epoll_create1; -+#elif HAVE_SYS_EVENT_H -+static int (*real_kqueue)(void); -+static int wrapped_calls_kqueue; -+#endif - - static void - init_fallbacks(int do_fallbacks) -@@ -64,7 +77,11 @@ init_fallbacks(int do_fallbacks) - real_socket = dlsym(RTLD_NEXT, "socket"); - real_fcntl = dlsym(RTLD_NEXT, "fcntl"); - real_recvmsg = dlsym(RTLD_NEXT, "recvmsg"); -+#ifdef HAVE_SYS_EPOLL_H - real_epoll_create1 = dlsym(RTLD_NEXT, "epoll_create1"); -+#elif HAVE_SYS_EVENT_H -+ real_kqueue = dlsym(RTLD_NEXT, "kqueue"); -+#endif - } - - __attribute__ ((visibility("default"))) int -@@ -72,10 +89,12 @@ socket(int domain, int type, int protoco - { - wrapped_calls_socket++; - -+#ifdef SOCK_CLOEXEC - if (fall_back && (type & SOCK_CLOEXEC)) { - errno = EINVAL; - return -1; - } -+#endif - - return real_socket(domain, type, protocol); - } -@@ -88,10 +107,12 @@ fcntl(int fd, int cmd, ...) - - wrapped_calls_fcntl++; - -+#ifdef F_DUPFD_CLOEXEC - if (fall_back && (cmd == F_DUPFD_CLOEXEC)) { - errno = EINVAL; - return -1; - } -+#endif - - va_start(ap, cmd); - arg = va_arg(ap, void*); -@@ -105,14 +126,17 @@ recvmsg(int sockfd, struct msghdr *msg, - { - wrapped_calls_recvmsg++; - -+#ifdef MSG_CMSG_CLOEXEC - if (fall_back && (flags & MSG_CMSG_CLOEXEC)) { - errno = EINVAL; - return -1; - } -+#endif - - return real_recvmsg(sockfd, msg, flags); - } - -+#ifdef HAVE_SYS_EPOLL_H - __attribute__ ((visibility("default"))) int - epoll_create1(int flags) - { -@@ -126,6 +150,15 @@ epoll_create1(int flags) - - return real_epoll_create1(flags); - } -+#elif HAVE_SYS_EVENT_H -+__attribute__ ((visibility("default"))) int -+kqueue(void) -+{ -+ wrapped_calls_kqueue++; -+ -+ return real_kqueue(); -+} -+#endif - - static void - do_os_wrappers_socket_cloexec(int n) -@@ -155,12 +188,14 @@ TEST(os_wrappers_socket_cloexec) - do_os_wrappers_socket_cloexec(0); - } - -+#ifdef SOCK_CLOEXEC - TEST(os_wrappers_socket_cloexec_fallback) - { - /* forced fallback */ - init_fallbacks(1); - do_os_wrappers_socket_cloexec(1); - } -+#endif - - static void - do_os_wrappers_dupfd_cloexec(int n) -@@ -194,11 +229,13 @@ TEST(os_wrappers_dupfd_cloexec) - do_os_wrappers_dupfd_cloexec(0); - } - -+#ifdef F_DUPFD_CLOEXEC - TEST(os_wrappers_dupfd_cloexec_fallback) - { - init_fallbacks(1); - do_os_wrappers_dupfd_cloexec(3); - } -+#endif - - struct marshal_data { - struct wl_connection *read_connection; -@@ -217,8 +254,7 @@ struct marshal_data { - static void - setup_marshal_data(struct marshal_data *data) - { -- assert(socketpair(AF_UNIX, -- SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); -+ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, data->s) == 0); - - data->read_connection = wl_connection_create(data->s[0]); - assert(data->read_connection); -@@ -327,11 +363,13 @@ TEST(os_wrappers_recvmsg_cloexec) - do_os_wrappers_recvmsg_cloexec(0); - } - -+#ifdef MSG_CMSG_CLOEXEC - TEST(os_wrappers_recvmsg_cloexec_fallback) - { - init_fallbacks(1); - do_os_wrappers_recvmsg_cloexec(1); - } -+#endif - - static void - do_os_wrappers_epoll_create_cloexec(int n) -@@ -341,12 +379,20 @@ do_os_wrappers_epoll_create_cloexec(int - - nr_fds = count_open_fds(); - -+#ifdef HAVE_SYS_EPOLL_H - fd = wl_os_epoll_create_cloexec(); -+#elif HAVE_SYS_EVENT_H -+ fd = wl_os_kqueue_create_cloexec(); -+#endif - assert(fd >= 0); - - #ifdef EPOLL_CLOEXEC -+#ifdef HAVE_SYS_EPOLL_H - assert(wrapped_calls_epoll_create1 == n); - #else -+ assert(wrapped_calls_kqueue == n); -+#endif -+#else - printf("No epoll_create1.\n"); - #endif - Property changes on: head/x11-servers/wayland/files/patch-tests_os-wrappers-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-src_wayland-server.c =================================================================== --- head/x11-servers/wayland/files/patch-src_wayland-server.c (revision 432803) +++ head/x11-servers/wayland/files/patch-src_wayland-server.c (nonexistent) @@ -1,82 +0,0 @@ ---- src/wayland-server.c.orig 2016-09-20 17:33:11.000000000 +0000 -+++ src/wayland-server.c 2016-12-13 20:07:06.878000000 +0000 -@@ -25,6 +25,8 @@ - - #define _GNU_SOURCE - -+#include "../config.h" -+ - #include - #include - #include -@@ -43,6 +45,11 @@ - #include - #include - -+#ifdef HAVE_SYS_UCRED_H -+#include -+#include -+#endif -+ - #include "wayland-util.h" - #include "wayland-private.h" - #include "wayland-server.h" -@@ -79,7 +86,13 @@ - struct wl_list link; - struct wl_map objects; - struct wl_signal destroy_signal; -+#ifdef HAVE_SYS_UCRED_H -+ /* FreeBSD */ -+ struct xucred xucred; -+#else -+ /* Linux */ - struct ucred ucred; -+#endif - int error; - struct wl_signal resource_created_signal; - }; -@@ -466,10 +479,20 @@ - if (!client->source) - goto err_client; - -+#if defined(SO_PEERCRED) -+ /* Linux */ - len = sizeof client->ucred; - if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, - &client->ucred, &len) < 0) - goto err_source; -+#elif defined(LOCAL_PEERCRED) -+ /* FreeBSD */ -+ len = sizeof client->xucred; -+ if (getsockopt(fd, SOL_SOCKET, LOCAL_PEERCRED, -+ &client->xucred, &len) < 0 || -+ client->xucred.cr_version != XUCRED_VERSION) -+ goto err_source; -+#endif - - client->connection = wl_connection_create(fd); - if (client->connection == NULL) -@@ -523,12 +546,23 @@ - wl_client_get_credentials(struct wl_client *client, - pid_t *pid, uid_t *uid, gid_t *gid) - { -+#ifdef HAVE_SYS_UCRED_H -+ /* FreeBSD */ -+ if (pid) -+ *pid = 0; /* FIXME: not defined on FreeBSD */ -+ if (uid) -+ *uid = client->xucred.cr_uid; -+ if (gid) -+ *gid = client->xucred.cr_gid; -+#else -+ /* Linux */ - if (pid) - *pid = client->ucred.pid; - if (uid) - *uid = client->ucred.uid; - if (gid) - *gid = client->ucred.gid; -+#endif - } - - /** Get the file descriptor for the client Property changes on: head/x11-servers/wayland/files/patch-src_wayland-server.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_queue-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_queue-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_queue-test.c (nonexistent) @@ -1,21 +0,0 @@ ---- tests/queue-test.c.orig 2016-04-29 23:36:09 UTC -+++ tests/queue-test.c -@@ -23,6 +23,8 @@ - * SOFTWARE. - */ - -+#include "../config.h" -+ - #include - #include - #include -@@ -30,6 +32,9 @@ - #include - #include - #include -+#ifdef HAVE_SIGNAL_H -+#include -+#endif - - #include "wayland-client.h" - #include "wayland-server.h" Property changes on: head/x11-servers/wayland/files/patch-tests_queue-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_client-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_client-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_client-test.c (nonexistent) @@ -1,19 +0,0 @@ ---- tests/client-test.c.orig 2015-07-06 19:38:51 UTC -+++ tests/client-test.c -@@ -34,6 +34,7 @@ - #include - #include - -+#include "wayland-os.h" - #include "wayland-private.h" - #include "wayland-server.h" - #include "test-runner.h" -@@ -59,7 +60,7 @@ TEST(client_destroy_listener) - struct client_destroy_listener a, b; - int s[2]; - -- assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0); -+ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, s) == 0); - display = wl_display_create(); - assert(display); - client = wl_client_create(display, s[0]); Property changes on: head/x11-servers/wayland/files/patch-tests_client-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-Makefile.am =================================================================== --- head/x11-servers/wayland/files/patch-Makefile.am (revision 432803) +++ head/x11-servers/wayland/files/patch-Makefile.am (nonexistent) @@ -1,29 +0,0 @@ ---- Makefile.am.orig 2016-02-29 23:30:58 UTC -+++ Makefile.am -@@ -73,7 +73,7 @@ nodist_include_HEADERS = \ - protocol/wayland-client-protocol.h - - libwayland_server_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread --libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm -+libwayland_server_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm - libwayland_server_la_LDFLAGS = -version-info 1:0:1 - libwayland_server_la_SOURCES = \ - src/wayland-server.c \ -@@ -85,7 +85,7 @@ nodist_libwayland_server_la_SOURCES = \ - protocol/wayland-protocol.c - - libwayland_client_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread --libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm -+libwayland_client_la_LIBADD = $(FFI_LIBS) $(EPOLLSHIM_LIBS) libwayland-private.la libwayland-util.la -lrt -lm - libwayland_client_la_LDFLAGS = -version-info 3:0:3 - libwayland_client_la_SOURCES = \ - src/wayland-client.c -@@ -186,7 +186,7 @@ libtest_runner_la_LIBADD = \ - libwayland-util.la \ - libwayland-client.la \ - libwayland-server.la \ -- -lrt -ldl $(FFI_LIBS) -+ -lrt $(DL_LIBS) $(FFI_LIBS) $(EPOLLSHIM_LIBS) - - - array_test_SOURCES = tests/array-test.c Property changes on: head/x11-servers/wayland/files/patch-Makefile.am ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_test-runner.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_test-runner.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_test-runner.c (nonexistent) @@ -1,170 +0,0 @@ ---- tests/test-runner.c.orig 2016-05-03 00:46:35 UTC -+++ tests/test-runner.c -@@ -25,6 +25,12 @@ - - #define _GNU_SOURCE - -+#include "../config.h" -+ -+#ifdef HAVE_SYS_PARAM_H -+#include -+#endif -+ - #include - #include - #include -@@ -37,18 +43,35 @@ - #include - #include - #include -+#ifdef __linux__ - #include -+#endif - #ifndef PR_SET_PTRACER - # define PR_SET_PTRACER 0x59616d61 - #endif -+#include - - #include "test-runner.h" - - static int num_alloc; -+ -+extern const struct test __start_test_section, __stop_test_section; -+ -+/* This is all disabled for FreeBSD because it gives "can't allocate initial -+ * thread" aborts otherwise. */ -+#ifndef __FreeBSD__ - static void* (*sys_malloc)(size_t); - static void (*sys_free)(void*); - static void* (*sys_realloc)(void*, size_t); - static void* (*sys_calloc)(size_t, size_t); -+#endif -+ -+#ifdef __FreeBSD__ -+/* XXX review ptrace() usage */ -+#define PTRACE_ATTACH PT_ATTACH -+#define PTRACE_CONT PT_CONTINUE -+#define PTRACE_DETACH PT_DETACH -+#endif - - /* when set to 1, check if tests are not leaking memory and opened files. - * It is turned on by default. It can be turned off by -@@ -57,7 +80,7 @@ int leak_check_enabled; - - /* when this var is set to 0, every call to test_set_timeout() is - * suppressed - handy when debugging the test. Can be set by -- * WAYLAND_TEST_NO_TIMEOUTS environment variable. */ -+ * WAYLAND_TESTS_NO_TIMEOUTS evnironment var */ - static int timeouts_enabled = 1; - - /* set to one if the output goes to the terminal */ -@@ -65,6 +88,7 @@ static int is_atty = 0; - - extern const struct test __start_test_section, __stop_test_section; - -+#ifndef __FreeBSD__ - __attribute__ ((visibility("default"))) void * - malloc(size_t size) - { -@@ -98,6 +122,7 @@ calloc(size_t nmemb, size_t size) - - return sys_calloc(nmemb, size); - } -+#endif - - static const struct test * - find_test(const char *name) -@@ -291,6 +316,8 @@ is_debugger_attached(void) - return 0; - } - -+ -+// xxx start here - pid = fork(); - if (pid == -1) { - perror("fork"); -@@ -311,7 +338,7 @@ is_debugger_attached(void) - _exit(1); - if (!waitpid(-1, NULL, 0)) - _exit(1); -- ptrace(PTRACE_CONT, NULL, NULL); -+ ptrace(PTRACE_CONT, ppid, NULL, NULL); - ptrace(PTRACE_DETACH, ppid, NULL, NULL); - _exit(0); - } else { -@@ -345,17 +372,19 @@ int main(int argc, char *argv[]) - const struct test *t; - pid_t pid; - int total, pass; -+#ifdef HAVE_WAITID - siginfo_t info; -+#else -+ int status; -+#endif - -+#ifndef __FreeBSD__ - /* Load system malloc, free, and realloc */ - sys_calloc = dlsym(RTLD_NEXT, "calloc"); - sys_realloc = dlsym(RTLD_NEXT, "realloc"); - sys_malloc = dlsym(RTLD_NEXT, "malloc"); - sys_free = dlsym(RTLD_NEXT, "free"); - -- if (isatty(fileno(stderr))) -- is_atty = 1; -- - if (is_debugger_attached()) { - leak_check_enabled = 0; - timeouts_enabled = 0; -@@ -363,6 +392,16 @@ int main(int argc, char *argv[]) - leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK"); - timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS"); - } -+#else -+ /* Disable leak checking on FreeBSD since we can't override malloc(). */ -+ leak_check_enabled = 0; -+ /* XXX review later */ -+ timeouts_enabled = 0; -+#endif -+ -+ if (isatty(fileno(stderr))) -+ is_atty = 1; -+ - - if (argc == 2 && strcmp(argv[1], "--help") == 0) - usage(argv[0], EXIT_SUCCESS); -@@ -394,7 +433,8 @@ int main(int argc, char *argv[]) - if (pid == 0) - run_test(t); /* never returns */ - -- if (waitid(P_PID, pid, &info, WEXITED)) { -+#ifdef HAVE_WAITID -+ if (waitid(P_PID, 0, &info, WEXITED)) { - stderr_set_color(RED); - fprintf(stderr, "waitid failed: %m\n"); - stderr_reset_color(); -@@ -425,6 +465,25 @@ int main(int argc, char *argv[]) - - break; - } -+#else -+ if (waitpid(-1, &status, 0) == -1) { -+ fprintf(stderr, "waitpid failed: %s\n", -+ strerror(errno)); -+ abort(); -+ } -+ -+ fprintf(stderr, "test \"%s\":\t", t->name); -+ if (WIFEXITED(status)) { -+ fprintf(stderr, "exit status %d", WEXITSTATUS(status)); -+ if (WEXITSTATUS(status) == EXIT_SUCCESS) -+ success = 1; -+ } else if (WIFSIGNALED(status)) { -+ fprintf(stderr, "signal %d", WTERMSIG(status)); -+ } -+#endif -+ -+ if (t->must_fail) -+ success = !success; - - if (success) { - pass++; Property changes on: head/x11-servers/wayland/files/patch-tests_test-runner.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_connection-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_connection-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_connection-test.c (nonexistent) @@ -1,29 +0,0 @@ ---- tests/connection-test.c.orig 2016-02-17 01:13:16 UTC -+++ tests/connection-test.c -@@ -36,6 +36,7 @@ - #include - #include - -+#include "wayland-os.h" - #include "wayland-private.h" - #include "test-runner.h" - #include "test-compositor.h" -@@ -47,7 +48,7 @@ setup(int *s) - { - struct wl_connection *connection; - -- assert(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, s) == 0); -+ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, s) == 0); - - connection = wl_connection_create(s[0]); - assert(connection); -@@ -145,8 +146,7 @@ struct marshal_data { - static void - setup_marshal_data(struct marshal_data *data) - { -- assert(socketpair(AF_UNIX, -- SOCK_STREAM | SOCK_CLOEXEC, 0, data->s) == 0); -+ assert(wl_os_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, data->s) == 0); - data->read_connection = wl_connection_create(data->s[0]); - assert(data->read_connection); - data->write_connection = wl_connection_create(data->s[1]); Property changes on: head/x11-servers/wayland/files/patch-tests_connection-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-src_wayland-shm.c =================================================================== --- head/x11-servers/wayland/files/patch-src_wayland-shm.c (revision 432803) +++ head/x11-servers/wayland/files/patch-src_wayland-shm.c (nonexistent) @@ -1,147 +0,0 @@ ---- src/wayland-shm.c.orig 2016-03-09 00:55:02 UTC -+++ src/wayland-shm.c -@@ -30,6 +30,8 @@ - - #define _GNU_SOURCE - -+#include "../config.h" -+ - #include - #include - #include -@@ -57,6 +59,9 @@ struct wl_shm_pool { - char *data; - int32_t size; - int32_t new_size; -+#ifdef HAVE_SYS_UCRED_H -+ int fd; -+#endif - }; - - struct wl_shm_buffer { -@@ -74,15 +79,24 @@ struct wl_shm_sigbus_data { - int fallback_mapping_used; - }; - -+static void *mremap_compat_maymove(void *, size_t, size_t, int, int, int); -+ - static void - shm_pool_finish_resize(struct wl_shm_pool *pool) - { - void *data; -+ int fd = -1; - - if (pool->size == pool->new_size) - return; - -- data = mremap(pool->data, pool->size, pool->new_size, MREMAP_MAYMOVE); -+#ifdef HAVE_SYS_UCRED_H -+ fd = pool->fd; -+#endif -+ -+ data = mremap_compat_maymove(pool->data, pool->size, pool->new_size, -+ PROT_READ | PROT_WRITE, MAP_SHARED, fd); -+ - if (data == MAP_FAILED) { - wl_resource_post_error(pool->resource, - WL_SHM_ERROR_INVALID_FD, -@@ -108,6 +122,10 @@ shm_pool_unref(struct wl_shm_pool *pool, - if (pool->internal_refcount + pool->external_refcount) - return; - -+#ifdef HAVE_SYS_UCRED_H -+ close(pool->fd); -+#endif -+ - munmap(pool->data, pool->size); - free(pool); - } -@@ -221,6 +239,73 @@ shm_pool_destroy(struct wl_client *clien - wl_resource_destroy(resource); - } - -+#ifdef HAVE_MREMAP -+static void * -+mremap_compat_maymove(void *old_address, size_t old_size, size_t new_size, -+ int old_prot, int old_flags, int old_fd) -+{ -+ return mremap(old_address, old_size, new_size, MREMAP_MAYMOVE); -+} -+#else -+static void * -+mremap_compat_maymove(void *old_address, size_t old_size, size_t new_size, -+ int old_prot, int old_flags, int old_fd) -+{ -+ /* FreeBSD doesn't support mremap() yet, so we have to emulate it. -+ * This assumes MREMAP_MAYMOVE is the only flag in use. */ -+ if (new_size == old_size) { -+ return old_address; -+ } else if (new_size < old_size) { -+ /* Shrinking: munmap() the spare region. */ -+ munmap(old_address + old_size, new_size - old_size); -+ return old_address; -+ } else { -+ void *ret; -+ -+ /* Growing. Try and mmap() the extra region at the end of -+ * our existing allocation. If that gets mapped in the -+ * wrong place, fall back to mmap()ing an entirely new -+ * region of new_size and copying the data across. */ -+ ret = mmap(old_address + old_size, new_size - old_size, -+ old_prot, old_flags, old_fd, 0); -+ -+/* FIXME TODO: msync() before munmap()? */ -+ if (ret == MAP_FAILED) { -+ /* Total failure! */ -+ return ret; -+ } else if (ret == old_address + old_size) { -+ /* Success. */ -+ return old_address; -+ } else if (ret != old_address + old_size) { -+ /* Partial failure. Fall back to mapping an -+ * entirely new region. Unmap the region we -+ * just mapped first. */ -+ munmap(ret, new_size - old_size); -+ -+ /* Map an entirely new region. */ -+ ret = mmap(NULL, new_size, -+ old_prot, old_flags, old_fd, 0); -+ if (ret == MAP_FAILED) { -+ /* Total failure! */ -+ return ret; -+ } -+ -+ /* Copy the old data across. Implicit assumption -+ * that the old and new regions don't overlap. */ -+ memcpy(ret, old_address, old_size); -+ -+ /* Unmap the old region. */ -+ munmap(old_address, old_size); -+ -+ return ret; -+ } -+ } -+ -+ /* Unreachable. */ -+ return MAP_FAILED; -+} -+#endif -+ - static void - shm_pool_resize(struct wl_client *client, struct wl_resource *resource, - int32_t size) -@@ -282,7 +367,14 @@ shm_create_pool(struct wl_client *client - "failed mmap fd %d", fd); - goto err_free; - } -+ -+#ifdef HAVE_SYS_UCRED_H -+ /* We need to keep the FD around on FreeBSD so we can implement -+ * mremap(). See: mremap_compat_maymove(). */ -+ pool->fd = fd; -+#else - close(fd); -+#endif - - pool->resource = - wl_resource_create(client, &wl_shm_pool_interface, 1, id); Property changes on: head/x11-servers/wayland/files/patch-src_wayland-shm.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-src_wayland-os.c =================================================================== --- head/x11-servers/wayland/files/patch-src_wayland-os.c (revision 432803) +++ head/x11-servers/wayland/files/patch-src_wayland-os.c (nonexistent) @@ -1,114 +0,0 @@ ---- src/wayland-os.c.orig 2015-07-06 19:38:51 UTC -+++ src/wayland-os.c -@@ -25,14 +25,20 @@ - - #define _GNU_SOURCE - -+#include "../config.h" -+ - #include - #include - #include - #include - #include -+#ifdef HAVE_SYS_EPOLL_H - #include -+#endif -+#ifdef HAVE_SYS_EVENT_H -+#include -+#endif - --#include "../config.h" - #include "wayland-os.h" - - static int -@@ -62,26 +68,50 @@ wl_os_socket_cloexec(int domain, int typ - { - int fd; - -+#ifdef SOCK_CLOEXEC - fd = socket(domain, type | SOCK_CLOEXEC, protocol); - if (fd >= 0) - return fd; - if (errno != EINVAL) - return -1; -+#endif - - fd = socket(domain, type, protocol); - return set_cloexec_or_close(fd); - } - - int -+wl_os_socketpair_cloexec(int domain, int type, int protocol, int sv[2]) -+{ -+ int retval; -+ -+#ifdef SOCK_CLOEXEC -+ retval = socketpair(domain, type | SOCK_CLOEXEC, protocol, sv); -+ if (retval >= 0) -+ return retval; -+ if (errno != EINVAL) -+ return -1; -+#endif -+ -+ retval = socketpair(domain, type, protocol, sv); -+ if (set_cloexec_or_close(sv[0]) < 0 || set_cloexec_or_close(sv[1]) < 0) -+ retval = -1; -+ -+ return retval; -+} -+ -+int - wl_os_dupfd_cloexec(int fd, long minfd) - { - int newfd; - -+#ifdef F_DUPFD_CLOEXEC - newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd); - if (newfd >= 0) - return newfd; - if (errno != EINVAL) - return -1; -+#endif - - newfd = fcntl(fd, F_DUPFD, minfd); - return set_cloexec_or_close(newfd); -@@ -123,15 +153,18 @@ wl_os_recvmsg_cloexec(int sockfd, struct - { - ssize_t len; - -+#ifdef MSG_CMSG_CLOEXEC - len = recvmsg(sockfd, msg, flags | MSG_CMSG_CLOEXEC); - if (len >= 0) - return len; - if (errno != EINVAL) - return -1; -+#endif - - return recvmsg_cloexec_fallback(sockfd, msg, flags); - } - -+#ifdef HAVE_SYS_EPOLL_H - int - wl_os_epoll_create_cloexec(void) - { -@@ -148,6 +181,19 @@ wl_os_epoll_create_cloexec(void) - fd = epoll_create(1); - return set_cloexec_or_close(fd); - } -+#endif -+ -+#ifdef HAVE_SYS_EVENT_H -+int -+wl_os_kqueue_create_cloexec(void) -+{ -+ int fd; -+ -+ fd = kqueue(); -+ -+ return set_cloexec_or_close(fd); -+} -+#endif - - int - wl_os_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen) Property changes on: head/x11-servers/wayland/files/patch-src_wayland-os.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_sanity-test.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_sanity-test.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_sanity-test.c (nonexistent) @@ -1,22 +0,0 @@ ---- tests/sanity-test.c.orig 2016-02-17 01:13:16 UTC -+++ tests/sanity-test.c -@@ -92,7 +92,8 @@ FAIL_TEST(sanity_malloc_direct) - TEST(disable_leak_checks) - { - volatile void *mem; -- assert(leak_check_enabled); -+// XXX FreeBSD disables leak checks... -+// assert(leak_check_enabled); - /* normally this should be on the beginning of the test. - * Here we need to be sure, that the leak checks are - * turned on */ -@@ -171,7 +172,8 @@ sanity_fd_no_leak(void) - { - int fd[2]; - -- assert(leak_check_enabled); -+// XXX FreeBSD leak checks are disabled -+// assert(leak_check_enabled); - - /* leak 2 file descriptors */ - if (pipe(fd) < 0) Property changes on: head/x11-servers/wayland/files/patch-tests_sanity-test.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/wayland/files/patch-tests_test-helpers.c =================================================================== --- head/x11-servers/wayland/files/patch-tests_test-helpers.c (revision 432803) +++ head/x11-servers/wayland/files/patch-tests_test-helpers.c (nonexistent) @@ -1,52 +0,0 @@ ---- tests/test-helpers.c.orig 2015-07-06 19:38:51 UTC -+++ tests/test-helpers.c -@@ -23,6 +23,12 @@ - * SOFTWARE. - */ - -+#include "../config.h" -+ -+#ifdef HAVE_SYS_PARAM_H -+#include -+#endif -+ - #include - #include - #include -@@ -32,6 +38,16 @@ - - #include "test-runner.h" - -+#ifdef __FreeBSD__ -+/* FreeBSD uses fdescfs (which must be mounted using: -+ * mount -t fdescfs fdescfs /dev/fd -+ * before the test suite can be run). */ -+#define OPEN_FDS_DIR "/dev/fd" -+#else -+/* Linux. */ -+#define OPEN_FDS_DIR "/proc/self/fd" -+#endif -+ - int - count_open_fds(void) - { -@@ -39,8 +55,8 @@ count_open_fds(void) - struct dirent *ent; - int count = 0; - -- dir = opendir("/proc/self/fd"); -- assert(dir && "opening /proc/self/fd failed."); -+ dir = opendir(OPEN_FDS_DIR); -+ assert(dir && "opening " OPEN_FDS_DIR " failed."); - - errno = 0; - while ((ent = readdir(dir))) { -@@ -49,7 +65,7 @@ count_open_fds(void) - continue; - count++; - } -- assert(errno == 0 && "reading /proc/self/fd failed."); -+ assert(errno == 0 && "reading " OPEN_FDS_DIR " failed."); - - closedir(dir); - Property changes on: head/x11-servers/wayland/files/patch-tests_test-helpers.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/Makefile =================================================================== --- head/x11-servers/Makefile (revision 432803) +++ head/x11-servers/Makefile (revision 432804) @@ -1,17 +1,16 @@ # $FreeBSD$ # COMMENT = X11 servers - SUBDIR += wayland SUBDIR += Xfstt SUBDIR += x11rdp SUBDIR += x2vnc SUBDIR += x2x SUBDIR += xephyr SUBDIR += xorg-dmx SUBDIR += xorg-nestserver SUBDIR += xorg-server SUBDIR += xorg-vfbserver .include